Estimation of GUK interventions

Seiro Ito

2024年08月22日 17:06

Overview

This note uses ANCOVA as the estimator of choice. ANCOVA assumes the initial value of outcome variable is a pure nusissance that it only adds a noise and is uncorrelated with the main regressor of interest, hence uses it as a covariate. Under such assumptions, it is shown that ANCOVA is more efficient than DID as it renders data to control for baseline differences in outcomes (Frison and Pocock 1992Frison, Lars, and Stuart J. Pocock. 1992. “Repeated Measures in Clinical Trials: Analysis Using Mean Summary Statistics and Its Implications for Design.” Statistics in Medicine 11 (13): 1685–1704. https://doi.org/10.1002/sim.4780111304.). ANCOVA become numerically the same as DID if the estimated coefficient on the covariate is unity. As shown in the results, we see that it smaller and the claim that DID overcorrects for the initial values applies to our data.

Click here to see the code of paths and definitions.
library(data.table)
library(qs)
library(kableExtra)
pathprogram <- paste0(path, "program/");  
pathsource <- paste0(path0, "source/")
pathsave <- paste0(path, "save/")
pathsaveHere <- paste0(pathsave, "EstimationMemo/")
pathfigure <- pathsavefigure <- paste0(pathprogram, "figure/")
pathtable <- paste0(pathprogram, "table/")
pathreceived <- paste0(path0, "received/")
pathcleaned <- paste0(pathreceived, "cleaned_by_RA/")
path1234 <- paste0(pathcleaned, "clean_panel_data_by_section/")
dir.create(pathsave)
dir.create(pathsaveHere)
file.remove(list.files("program/cache", full.names = T))
#### Uncommenting below deletes all input/output of R from html. Why???
#### render_listings()  ####    it changes "<-" to real arrows, etc., prettifying
#### Tabulation functions
source(paste0(pathprogram, "TabulationFunctions.R"))
#### substitution table "sbt"
source(paste0(pathprogram, "SubstTable.R"))
source(paste0(pathprogram, "SubstTableANCOVA.R"))
source(paste0(pathprogram, "SubstTablePerm.R"))
#### Estimation functions
source(paste0(pathprogram, "EstimationFunctions.R"))
#### CombinenamesXYZ functions
source(paste0(pathprogram, "GetCovariatesFunctions.R"))
RMDenomination <- 1000
datafiles <- c("s1", "arA", "ar", "ass", "lvo", "lvoL", "lvp", "lab", "far", "con", "obr")
Datafiles <- c("S1", "ArA", "Ar", "Ass", "Lvo", "LvoL", "Lvp", "Lab", "Far", "Con", "Obr")
DataFileNames <- c(
  "Schooling", "AllMeetingsRepayment", "Repayment", "Asset", 
  "Livestock", "LivestockLong", "LivestockProducts",
  "LabourIncome", "FarmIncome", "Consumption", "OtherBorrowing")
ShortfallFileNames<- c("Group", "Individual", "o800")
FileNameHeader <- paste0(c("", "Grace", "PovertyStatus", "Size", "Attributes"),
  "OriginalHHs")
filenamelist <- c("Group", "Individual")
arms <- c("traditional", "large", "large grace", "cow")
Arms <- c("Traditional", "Large", "LargeGrace", "Cow")
armsC <- c("traditional", "large", "large grace", "cattle")
ArmsC <- c("Traditional", "Large", "Large grace", "Cattle")
ArmsC2 <- c("Traditional", "Large", "LargeGrace", "Cattle")
Attributes <- c("Traditional", "LargeSize", "WithGrace", "InKind")
InitialSampleMonthUpperBound <- 6
Only800 <- T
UseTrimmedSample <- T
NotPrintFileNames <- ""
#NotPrintFileNames <- "%"
PrintFormulae <- F
PermRepTimes <- 100000

Estimation strategy

Estimation uses initial sample HHs (800 households less the members receiving less than 3 loans in Traditional arm).

Econometric specification

ANCOVA is a model that controls for the preexisting differences by including initial values of \(y\) as a covariate (usually a continuous variable which can be seen as a nuissance) to the estimated impacts of a categorical variable (treated/control). We use ANCOVA because it is more effcient than DID if randomisation is successful.

The estimating equation for our intention-to-treat effects is: \[\begin{equation} y_{it}=b_{1}y_{i1}+b_{a_{0}}+\bfb'\bfdee_{i}+e_{it}, \quad t=2, 3, 4, \label{1steq} \end{equation}\] where, for member \(i\) in survey round \(t\) (\(t=1\) is the baseline), \(y_{it}\) is an outcome measure, \(\bfdee_{i}\) is a vector of three indicator variables in non-Traditional arms or functional attributes that \(i\) receives, \(\bfb'=\left( \begin{array}{ccc} b_{a_{1}} & b_{a_{2}} & b_{a_{3}} \end{array} \right)\) is associated impacts of the \(k-\)th arm \(a_{k}\) relative to Traditional arm or functional attribute \(a_{k'}\), \(e_{it}\) is an error term. For the Traditional arm, the conditional mean of outcome given baseline outcome variable is given by \(b_{a_{0}}\). For an arm \(a_{k}\) or a functional attribute \(a_{k'}\), the impact relative to the traditional arm is measured with \(b_{a_{k}}\) or \(b_{a_{k'}}\). In this section, we will only use \(a_{k}\) for simplicity.

As we are interested in the time course of relative impacts, we extend equation \(\eqref{1steq}\) as: \[\begin{equation} y_{it}=b_{1}y_{i1}+b_{a_{0}}+\bfb'_{}\bfdee_{i}+b_{3a_{0}}c_{3}+\bfb'_{3}\bfdee_{i}c_{3}+b_{4a_{0}}c_{4}+\bfb'_{4}\bfdee_{i}c_{4}+\bfgamma'\bfx_{it}+e_{it}, \quad t=2, 3, 4, \label{2ndeq} \end{equation}\] where \(\bfb'_{t}=\left( \begin{array}{ccc} b_{ta_{1}} & b_{ta_{2}} & b_{ta_{3}} \end{array} \right)\) is a vector of time-varying impacts relative to concurrent Traditional arm in period \(t=3, 4\), \(c_{3}\) is a dummy variable for \(t=3\) and \(c_{4}\) is a dummy variable for \(t=4\). \(\bfb'_{}\) picks up impacts for \(t=2\) for non-traditional arms. \(\bfx_{it}=\) \(\left( \begin{array}{ccc} \bfx'_{1it} & \bfx'_{2it} & x_{3it} \end{array} \right)'\) is a vector of covariates consisting of \(\bfx_{1it}, \bfx_{2it}, x_{3it}\). \(\bfx_{1it}\) is a vector of baseline demographic characteristics, \(\bfx_{2it}\) is a vector of previous cattle rearing experiences and their interactions with treatment arms, and \(x_{3it}\) is number of owned cattle at the baseline. The regression specifications are: First is estimated without \(\bfx_{it}\), second is estimated with \(\bfx_{1it}\), third is estimated with \(\bfx_{1it}, \bfx_{2it}\), fourth is estimated with \(\bfx_{1it}, x_{3it}\), and fifth is estimated with \(\bfx_{1it}, \bfx_{2it}, x_{3it}\).1 In outcomes that are not directly related to cattle rearing, we do not use previous cattle rearing experience and number of owned cattle at the baseline for covariates, so we only have specification 1 and 2.

Our main interest is on the time-varying impacts of \(k\)-th non-traditional arm relative to the traditional arm outcomes. In equation (2), this is captured by \(b_{a_{k}}\) for period 2, \(b_{a_{k}} + b_{3a_{k}}\) for period 3, and \(b_{a_{k}} + b_{4a_{k}}\) for period 4. We plot these estimates for time-varying impacts using error bar charts in the next section. Given our sample is obtained by cluster sampling with clusters as chars, and intervention was randomised at the char level, all the standard errors are clustered at the char (group) level as suggested by .

Code outline

In the estimation, there are 7 regression types (regtype) in estimation, which are:

In our analysis, we mainly rely on “Time varying by arm,” and refer to “Time varying by functional attribute” whenever necessary. We use “by poverty class” types to test if the impacts differ between the ultra poor and the moderately poor. Within each type, there are 5 regression specifications depending on the covariates being used.

  1. No covariates
  2. \(+\) Household level characteristics (head literacy, flood, household size)
  3. \(+\) Household level characteristics + Baseline cattle ownership (indicator)
  4. \(+\) Household level characteristics + Baseline owned cattle size
  5. \(+\) Household level characteristics + Baseline owned cattle size + Baseline cattle ownership (indicator)

ANCOVA implemetation

Estimation of various impacts follows the same steps.2 See schooling estimation for commented code.

Setting up

Choose

  • Outcome (FileName, Regressand)
  • Data (DataToUse)
  • Regression type (FileNameHeader)
  • Covariates (additions)3 Before adding covariates, we drop certain variables to make coding easier. E.g., we drop dummyLargeSize when we want to use dummyLarge so regular expression becomes simpler.

Covariates give 5 regression specifications.

Spec 1:  No covariates (OLS)
Spec 2:  └── + lagged outcomes (ANCOVA, hereafter)
Spec 3:      └── + household level variables
Spec 4:          ├── + cattle ownership and interaction
Spec 5:          └── + cattle herd size
Spec 6:              └──  + cattle ownership and interaction

ANCOVA, cluster robust SEs, and result tabulation

ANCOVAEstimationFile3.R{:target=“_blank”} does the following:

  1. Estimate: Run a linear regression with specified covariates, use clx function4 clx is written by Mahmood Arai. It uses lmtest and sandwich packages. While there are other packages that provide cluster robust standard errors, clx is simple, minimal and does the job. to compute cluster robust SEs.
  2. Collect and tabulate estimates: From a list of regression results, tabulate with tabs2latex3 function. Compute variable means and standard deviations, collect regression statistics, and attach to tabulated results.
  3. Print Tables: Use latextab (for LaTeX) and kable (for HTML) to print.5 For HTML, kableExtra is also used but minimally only for column specifications. In a tufte::tufte_html output, kbl or kable_styling functions mess up the table’s horizontal placement position or full_width.
  4. Save regression objects (ANCOVA_XXX.qs) to be used in inference (hypothesis testing).

Estimation

Schooling

Sample is restricted to school age children at the initial period. This is because we use initial variable in ANCOVA. In addition, we drop children with no enrollment information for three periods.

#### Read schooling data and drop observations with nnn in SchPattern
source(paste0(pathprogram, "ReadTrimSchoolingANCOVA.R"))
#### Set file name to be used in saving results
FileName <- "Schooling"
#### Regression types
FileNameHeader <- c("", "Attributes", "PovertyStatus",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "a", "P", "T", "Ta", "TP", "TPa")
#### For schooling, we drop estimation by poverty class
regsuffixes <- c("", "a", "P", "T", "Ta")
#### Below 2 objects are used internally to select covariates
listheader <- paste0("sc", regsuffixes)
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
#### Choose covariates
source(paste0(pathprogram, "SchoolingCovariateSelectionANCOVA3.R"))
#### jay: Number of regression speficiations including OLS (=6 in schooling)
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
#### Regressand of each reg specification
Regressands <- rep("Enrolled", jay)
#### Data to be used: s1 (produced in ReadTrimSchoolingANCOVA.R)
DataToUse1 <- DataToUse2 <- rep("s1", jay)
#### LaTeX tabulation specifications
Addseparatingcols = NULL; Separatingcolwidth = .2
dig.depmean <- 2
AddMeanStdColumn <- UseRawDataForDestat <- T
#### Estimate
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the table of time varying schooling impacts by arm.

Enrolled0 is the baseline dependent variable of ANCOVA, ChilAgeOrderAtRd1, Household size0 are baseline covariates. (1) is OLS, (2)-(5) are ANCOVA estimates.

Schooling,

covariates mean/std 1 2 3 4 5 6
(Intercept) 0.91 0.69 0.75 0.89 0.73 0.86
(0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary 0.338 -0.11 -0.09 -0.11 -0.09
(0.47) (0.0) (0.0) (0.0) (0.0)
College 0.172 -0.21 -0.18 -0.20 -0.18
(0.38) (0.0) (0.0) (0.0) (0.0)
Large 0.272 -0.03 -0.04 -0.04 -0.04 -0.04 -0.04
(0.44) (38.5) (20.0) (15.0) (13.6) (16.8) (14.3)
LargeGrace 0.247 -0.04 -0.05 -0.04 -0.05 -0.04 -0.04
(0.43) (21.6) (12.1) (12.5) (9.7) (13.4) (11.3)
Cattle 0.257 -0.05 -0.06 -0.06 -0.06 -0.06 -0.05
(0.44) (16.7) (5.5) (2.3) (3.1) (2.7) (3.9)
Large \(\times\) Secondary 0.085 -0.01 0.00 -0.00 0.01
(0.28) (90.6) (92.5) (95.1) (89.4)
LargeGrace \(\times\) Secondary 0.083 -0.07 -0.08 -0.07 -0.08
(0.28) (12.8) (11.6) (15.5) (11.0)
Cattle \(\times\) Secondary 0.088 -0.01 -0.01 -0.01 -0.01
(0.28) (77.3) (80.0) (82.5) (83.0)
Large \(\times\) College 0.049 0.03 0.04 0.04 0.06
(0.22) (68.1) (58.4) (51.3) (34.0)
LargeGrace \(\times\) College 0.049 -0.02 -0.04 -0.02 -0.03
(0.22) (72.4) (59.1) (78.6) (68.8)
Cattle \(\times\) College 0.035 -0.11 -0.13 -0.07 -0.09
(0.18) (16.2) (8.3) (28.4) (19.7)
Female 0.450 0.05 0.05
(0.50) (2.9) (4.9)
Secondary \(\times\) Female 0.152 0.08 0.08
(0.36) (0.4) (0.9)
College \(\times\) Female 0.059 0.12 0.10
(0.24) (2.0) (6.4)
Large \(\times\) Female 0.121 0.01 0.03
(0.33) (92.1) (64.1)
LargeGrace \(\times\) Female 0.114 0.08 0.06
(0.32) (10.5) (19.0)
Cattle \(\times\) Female 0.114 0.07 0.08
(0.32) (16.0) (11.3)
Large \(\times\) Secondary \(\times\) Female 0.041 -0.09 -0.11
(0.20) (34.0) (20.0)
LargeGrace \(\times\) Secondary \(\times\) Female 0.036 0.10 0.12
(0.19) (26.7) (18.8)
Cattle \(\times\) Secondary \(\times\) Female 0.037 0.05 0.06
(0.19) (58.0) (52.9)
Large \(\times\) College \(\times\) Female 0.016 0.08 0.11
(0.12) (58.1) (46.2)
LargeGrace \(\times\) College \(\times\) Female 0.018 -0.03 0.01
(0.13) (84.5) (95.2)
Cattle \(\times\) College \(\times\) Female 0.010 0.18 0.17
(0.10) (25.5) (30.8)
EldestSon 0.267 0.00 0.04
(0.44) (89.8) (31.8)
EldestDaughter 0.188 0.04 0.01
(0.39) (23.9) (77.2)
Flood in round 1 0.464 -0.04 -0.05
(0.50) (4.8) (3.6)
Head literate0 0.108 0.06 0.06
(0.31) (1.8) (1.8)
Head age0 39.153 -0.00 -0.00
(7.38) (7.7) (7.6)
Enrolled0 0.760 0.29 0.32 0.29 0.31 0.29
(0.43) (0.0) (0.0) (0.0) (0.0) (0.0)
ChildAgeOrderAtRd1 1.826 0.02 0.02
(0.98) (21.7) (24.6)
Household size0 4.974 -0.02 -0.01
(1.15) (21.5) (32.9)
T = 2 89 89 89 75 89 75
T = 3 135 135 135 126 135 126
T = 4 539 539 539 500 539 500
R2 0.002 0.150 0.208 0.200 0.222 0.209
Mean of dependent variable 0.88 0.88 0.88 0.88 0.88 0.88
N 1841 1976 1976 1976 1841 1976 1841

Notes:

  1. ANCOVA estimates using administrative and survey data. Post treatment regressands are regressed on categorical variables, pre-treatment regressand and other covariates. FloodInRd1 and HeadLiterate0 are indicator variables for the presence of self reported damage by a flood at the baseline, and literacy of household head, respectively. HHsize0 is household size at the baseline. We annotate the number of periods that a household is observed with T. The total number of households is shown for each values of T. T=4 indicates the number of households with complete panel information, T=3 indicates number of households observed three times, T=2 indicates the number of households observed twice. N indicates total number of observations used in ANCOVA estimation, or N$=$1$\ imes$(T=2)+2$\ imes$(T=3)+3$\ imes$(T=4). Large, LargeGrace, Cattle are indicator variables of the large, large grace, and cattle arms, respectively. The default arm category is traditional arm. Secondary and College are indicator variables of secondary schooling (ages 13-15) and tertiary schooling (ages 16-18), both at the time of baseline. Default category is primary (ages 05-12). Interaction terms of dummy variables are demeaned before interacting. The first column gives mean and standard deviation (in parenthesises) of each covariates before demeaning.
  2. \(P\) values in percentages in parenthesises. Standard errors are clustered at group (village) level.
Click here to see the table of time varying schooling impacts by arm.

Schooling, TimeVarying

covariates mean/std 1 2 3 4 5 6
(Intercept) 0.86 0.65 0.70 0.82 0.69 0.79
(0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary 0.338 -0.14 -0.12 -0.14 -0.12
(0.47) (0.0) (0.0) (0.0) (0.0)
College 0.172 -0.24 -0.21 -0.23 -0.21
(0.38) (0.0) (0.0) (0.0) (0.0)
Large 0.272 -0.02 -0.03 -0.04 -0.03 -0.04 -0.03
(0.44) (59.3) (44.7) (23.7) (31.2) (23.9) (29.5)
LargeGrace 0.247 -0.03 -0.04 -0.04 -0.04 -0.03 -0.03
(0.43) (36.5) (26.6) (22.1) (19.0) (25.7) (22.7)
Cattle 0.257 -0.03 -0.04 -0.06 -0.05 -0.05 -0.05
(0.44) (39.5) (16.7) (5.3) (8.5) (6.3) (10.1)
Large \(\times\) Secondary 0.085 0.08 0.04 0.04 0.05 0.04 0.05
(0.28) (30.4) (61.0) (51.1) (41.6) (52.5) (40.9)
LargeGrace \(\times\) Secondary 0.083 -0.06 -0.06 -0.07 -0.07 -0.06 -0.07
(0.28) (47.8) (46.6) (30.1) (28.8) (36.9) (31.8)
Cattle \(\times\) Secondary 0.088 -0.01 0.00 -0.00 0.00 0.00 0.01
(0.28) (94.5) (99.9) (95.7) (97.4) (96.6) (91.3)
Large \(\times\) College 0.049 0.07 0.05 0.04 0.10 0.04 0.11
(0.22) (55.8) (68.1) (65.8) (27.9) (56.5) (20.1)
LargeGrace \(\times\) College 0.049 0.02 0.01 0.02 0.02 0.01 0.03
(0.22) (89.9) (91.9) (83.6) (77.4) (86.1) (72.3)
Cattle \(\times\) College 0.035 -0.04 -0.01 -0.06 -0.06 -0.05 -0.05
(0.18) (76.4) (90.8) (51.2) (48.7) (57.4) (59.2)
Female 0.450 0.04 0.05
(0.50) (6.1) (8.1)
Secondary \(\times\) Female 0.152 0.10 0.09
(0.36) (0.5) (1.0)
College \(\times\) Female 0.059 0.08 0.07
(0.24) (17.0) (27.8)
Large \(\times\) Female 0.121 -0.01 -0.01 -0.01 0.02 0.00 0.02
(0.33) (86.7) (82.8) (87.2) (76.8) (99.5) (64.3)
LargeGrace \(\times\) Female 0.114 0.10 0.09 0.09 0.07 0.09 0.07
(0.32) (11.7) (12.1) (11.2) (15.6) (8.1) (12.3)
Cattle \(\times\) Female 0.114 0.06 0.06 0.06 0.07 0.07 0.08
(0.32) (45.2) (28.3) (28.5) (15.8) (18.5) (10.0)
Large \(\times\) Secondary \(\times\) Female 0.041 -0.19 -0.17 -0.18 -0.22 -0.17 -0.21
(0.20) (14.3) (16.5) (12.0) (3.1) (11.0) (2.9)
LargeGrace \(\times\) Secondary \(\times\) Female 0.036 0.04 0.06 0.05 0.05 0.06 0.06
(0.19) (75.8) (60.9) (69.1) (61.8) (60.6) (51.4)
Cattle \(\times\) Secondary \(\times\) Female 0.037 0.01 -0.05 -0.07 -0.04 -0.05 -0.03
(0.19) (91.8) (72.1) (60.9) (76.1) (66.8) (81.6)
Large \(\times\) College \(\times\) Female 0.016 0.11 0.10 0.04 0.16 0.04 0.17
(0.12) (68.8) (63.9) (84.3) (45.5) (81.6) (42.8)
LargeGrace \(\times\) College \(\times\) Female 0.018 -0.06 -0.02 0.05 0.12 0.03 0.11
(0.13) (81.3) (94.6) (81.7) (55.9) (88.9) (58.7)
Cattle \(\times\) College \(\times\) Female 0.010 0.39 0.26 0.22 0.25 0.25 0.27
(0.10) (14.5) (24.3) (26.3) (21.9) (18.6) (18.8)
rd 3 0.343 0.05 0.04 0.06 0.05 0.06 0.05
(0.47) (0.0) (0.1) (0.0) (0.0) (0.0) (0.0)
Secondary \(\times\) rd 3 0.120 -0.01 -0.02 -0.01 -0.02
(0.32) (84.6) (46.7) (87.6) (47.3)
College \(\times\) rd 3 0.055 0.03 0.02 0.02 0.01
(0.23) (49.9) (68.7) (62.0) (79.1)
Large \(\times\) rd 3 0.091 -0.04 -0.04 -0.05 -0.05 -0.05 -0.06
(0.29) (29.4) (28.5) (17.0) (9.9) (17.3) (8.4)
LargeGrace \(\times\) rd 3 0.086 -0.07 -0.07 -0.08 -0.08 -0.08 -0.08
(0.28) (5.5) (3.2) (2.2) (2.6) (2.0) (2.2)
Cattle \(\times\) rd 3 0.089 -0.05 -0.06 -0.06 -0.07 -0.06 -0.06
(0.28) (22.0) (11.0) (11.1) (6.3) (11.2) (7.8)
Large \(\times\) Secondary \(\times\) rd 3 0.028 -0.04 0.00 0.00 -0.01 -0.01 -0.02
(0.17) (64.5) (96.8) (99.5) (89.1) (93.5) (81.4)
LargeGrace \(\times\) Secondary \(\times\) rd 3 0.028 0.05 0.08 0.08 0.06 0.06 0.05
(0.16) (56.2) (33.1) (33.0) (44.4) (43.8) (53.9)
Cattle \(\times\) Secondary \(\times\) rd 3 0.032 0.02 0.06 0.06 0.05 0.06 0.05
(0.18) (82.0) (49.7) (49.6) (58.1) (48.8) (57.7)
Large \(\times\) College \(\times\) rd 3 0.015 0.09 0.05 0.09 -0.01 0.09 -0.01
(0.12) (54.0) (66.2) (44.4) (94.6) (42.2) (93.4)
LargeGrace \(\times\) College \(\times\) rd 3 0.017 -0.04 -0.03 -0.01 -0.04 0.00 -0.04
(0.13) (66.6) (72.5) (89.9) (70.1) (99.4) (72.5)
Cattle \(\times\) College \(\times\) rd 3 0.012 0.05 0.03 0.04 -0.01 0.04 -0.01
(0.11) (74.2) (83.5) (76.8) (95.0) (76.2) (92.7)
Female \(\times\) rd 3 0.155 0.00 0.01
(0.36) (90.1) (69.1)
Large \(\times\) Female \(\times\) rd 3 0.040 0.07 0.06 0.07 0.06 0.07 0.07
(0.20) (29.9) (31.9) (23.3) (27.9) (19.2) (24.6)
LargeGrace \(\times\) Female \(\times\) rd 3 0.039 0.04 0.03 0.03 0.04 0.04 0.04
(0.19) (53.2) (55.6) (59.4) (51.8) (48.6) (43.0)
Cattle \(\times\) Female \(\times\) rd 3 0.040 0.03 0.05 0.05 0.05 0.06 0.06
(0.20) (64.0) (36.2) (37.5) (42.4) (37.6) (41.1)
Large \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.014 0.16 0.16 0.15 0.14 0.19 0.19
(0.12) (43.0) (36.8) (38.8) (30.7) (26.2) (17.3)
LargeGrace \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.012 0.23 0.19 0.21 0.22 0.24 0.26
(0.11) (25.8) (28.8) (23.3) (17.9) (14.9) (9.5)
Cattle \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.012 0.31 0.30 0.29 0.18 0.31 0.22
(0.11) (10.1) (7.8) (9.1) (22.6) (7.5) (14.4)
Large \(\times\) College \(\times\) Female \(\times\) rd 3 0.003 0.29 0.29 0.24 0.08 0.24 0.07
(0.06) (32.4) (20.5) (26.1) (76.4) (25.9) (78.1)
LargeGrace \(\times\) College \(\times\) Female \(\times\) rd 3 0.006 0.08 0.10 -0.05 -0.13 -0.04 -0.12
(0.08) (72.8) (61.7) (78.3) (54.8) (84.0) (58.5)
Cattle \(\times\) College \(\times\) Female \(\times\) rd 3 0.004 -0.43 -0.28 -0.29 -0.30 -0.29 -0.31
(0.06) (16.4) (27.8) (25.7) (28.5) (25.3) (28.4)
Secondary \(\times\) Female \(\times\) rd 3 0.052 -0.00 0.04
(0.22) (97.3) (46.1)
College \(\times\) Female \(\times\) rd 3 0.017 -0.01 -0.02
(0.13) (90.4) (85.6)
rd 4 0.276 0.10 0.08 0.14 0.13 0.14 0.13
(0.45) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary \(\times\) rd 4 0.143 -0.02 -0.03 -0.02 -0.04
(0.35) (58.3) (43.3) (54.9) (40.7)
College \(\times\) rd 4 0.057 0.02 0.00 -0.00 -0.01
(0.23) (61.7) (94.4) (96.0) (84.5)
Large \(\times\) rd 4 0.080 -0.06 -0.04 -0.07 -0.08 -0.08 -0.09
(0.27) (27.2) (49.1) (10.9) (6.0) (8.5) (3.7)
LargeGrace \(\times\) rd 4 0.069 -0.02 -0.01 -0.04 -0.05 -0.04 -0.05
(0.25) (73.9) (84.2) (42.3) (26.3) (40.3) (25.3)
Cattle \(\times\) rd 4 0.067 -0.03 -0.03 -0.05 -0.05 -0.05 -0.05
(0.25) (50.0) (53.4) (27.7) (19.6) (26.3) (18.2)
Large \(\times\) Secondary \(\times\) rd 4 0.036 -0.11 -0.11 -0.04 -0.06 -0.03 -0.06
(0.19) (37.9) (32.6) (68.7) (52.8) (75.6) (53.2)
LargeGrace \(\times\) Secondary \(\times\) rd 4 0.035 0.04 0.02 0.06 0.05 0.04 0.03
(0.18) (75.2) (85.5) (55.4) (64.6) (69.0) (77.0)
Cattle \(\times\) Secondary \(\times\) rd 4 0.037 -0.02 -0.00 0.03 0.01 0.03 0.01
(0.19) (90.8) (97.2) (77.0) (90.8) (80.3) (93.2)
Large \(\times\) College \(\times\) rd 4 0.018 -0.10 -0.14 -0.03 -0.11 -0.02 -0.11
(0.13) (57.5) (34.5) (84.5) (44.0) (85.7) (43.0)
LargeGrace \(\times\) College \(\times\) rd 4 0.015 -0.29 -0.28 -0.23 -0.25 -0.20 -0.23
(0.12) (2.1) (1.7) (4.2) (2.9) (7.0) (3.9)
Cattle \(\times\) College \(\times\) rd 4 0.011 -0.15 -0.13 -0.08 -0.10 -0.05 -0.08
(0.10) (31.8) (29.1) (51.7) (43.4) (65.8) (54.2)
Female \(\times\) rd 4 0.131 -0.07 -0.06
(0.34) (0.5) (1.8)
Large \(\times\) Female \(\times\) rd 4 0.038 0.08 0.12 0.15 0.14 0.16 0.15
(0.19) (25.6) (12.1) (1.1) (3.3) (0.3) (1.3)
LargeGrace \(\times\) Female \(\times\) rd 4 0.034 -0.05 -0.00 -0.00 -0.00 0.00 0.00
(0.18) (51.7) (99.9) (95.7) (95.6) (94.9) (95.1)
Cattle \(\times\) Female \(\times\) rd 4 0.030 0.00 0.09 0.10 0.08 0.11 0.10
(0.17) (99.3) (28.7) (16.0) (19.9) (10.9) (13.2)
Large \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.016 0.22 0.11 0.05 0.11 0.02 0.07
(0.13) (33.7) (56.6) (80.5) (50.1) (90.6) (66.2)
LargeGrace \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.017 0.09 -0.09 -0.06 -0.02 -0.08 -0.03
(0.13) (70.0) (65.8) (73.5) (92.4) (67.0) (84.5)
Cattle \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.018 0.26 0.13 0.11 0.04 0.08 0.02
(0.13) (21.1) (48.6) (56.6) (82.3) (65.1) (91.3)
Large \(\times\) College \(\times\) Female \(\times\) rd 4 0.010 0.14 0.06 0.05 -0.20 -0.01 -0.25
(0.10) (66.7) (80.5) (83.9) (49.7) (96.2) (37.9)
LargeGrace \(\times\) College \(\times\) Female \(\times\) rd 4 0.007 0.37 0.27 0.08 -0.05 0.09 -0.05
(0.08) (18.0) (25.1) (72.7) (84.6) (71.6) (85.6)
Cattle \(\times\) College \(\times\) Female \(\times\) rd 4 0.004 0.03 -0.01 -0.14 -0.19 -0.12 -0.17
(0.06) (94.0) (98.5) (63.4) (54.4) (69.0) (60.6)
Secondary \(\times\) Female \(\times\) rd 4 0.067 -0.01 0.02
(0.25) (88.6) (78.2)
College \(\times\) Female \(\times\) rd 4 0.029 0.14 0.15
(0.17) (15.6) (17.0)
EldestSon 0.267 0.01 0.04
(0.44) (80.4) (23.2)
EldestDaughter 0.188 0.03 0.01
(0.39) (30.8) (77.7)
Flood in round 1 0.464 -0.05 -0.05
(0.50) (4.1) (3.2)
Head literate0 0.108 0.06 0.06
(0.31) (2.2) (2.3)
Head age0 39.153 -0.00 -0.00
(7.38) (17.9) (18.8)
Enrolled0 0.760 0.28 0.32 0.30 0.31 0.29
(0.43) (0.0) (0.0) (0.0) (0.0) (0.0)
ChildAgeOrderAtRd1 1.826 0.02 0.02
(0.98) (28.3) (25.9)
Household size0 4.974 -0.01 -0.01
(1.15) (34.3) (41.1)
T = 2 89 89 89 75 89 75
T = 3 135 135 135 126 135 126
T = 4 539 539 539 500 539 500
R2 0.021 0.160 0.232 0.216 0.240 0.222
Mean of dependent variable 0.88 0.88 0.88 0.88 0.88 0.88
N 1841 1976 1976 1976 1841 1976 1841

Schooling, TimeVarying

covariates mean/std 1 2 3 4 5 6
(Intercept) 0.86 0.65 0.70 0.82 0.69 0.79
(0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary 0.338 -0.14 -0.12 -0.14 -0.12
(0.47) (0.0) (0.0) (0.0) (0.0)
College 0.172 -0.24 -0.21 -0.23 -0.21
(0.38) (0.0) (0.0) (0.0) (0.0)
Large 0.272 -0.02 -0.03 -0.04 -0.03 -0.04 -0.03
(0.44) (59.3) (44.7) (23.7) (31.2) (23.9) (29.5)
LargeGrace 0.247 -0.03 -0.04 -0.04 -0.04 -0.03 -0.03
(0.43) (36.5) (26.6) (22.1) (19.0) (25.7) (22.7)
Cattle 0.257 -0.03 -0.04 -0.06 -0.05 -0.05 -0.05
(0.44) (39.5) (16.7) (5.3) (8.5) (6.3) (10.1)
Large \(\times\) Secondary 0.085 0.08 0.04 0.04 0.05 0.04 0.05
(0.28) (30.4) (61.0) (51.1) (41.6) (52.5) (40.9)
LargeGrace \(\times\) Secondary 0.083 -0.06 -0.06 -0.07 -0.07 -0.06 -0.07
(0.28) (47.8) (46.6) (30.1) (28.8) (36.9) (31.8)
Cattle \(\times\) Secondary 0.088 -0.01 0.00 -0.00 0.00 0.00 0.01
(0.28) (94.5) (99.9) (95.7) (97.4) (96.6) (91.3)
Large \(\times\) College 0.049 0.07 0.05 0.04 0.10 0.04 0.11
(0.22) (55.8) (68.1) (65.8) (27.9) (56.5) (20.1)
LargeGrace \(\times\) College 0.049 0.02 0.01 0.02 0.02 0.01 0.03
(0.22) (89.9) (91.9) (83.6) (77.4) (86.1) (72.3)
Cattle \(\times\) College 0.035 -0.04 -0.01 -0.06 -0.06 -0.05 -0.05
(0.18) (76.4) (90.8) (51.2) (48.7) (57.4) (59.2)
Female 0.450 0.04 0.05
(0.50) (6.1) (8.1)
Secondary \(\times\) Female 0.152 0.10 0.09
(0.36) (0.5) (1.0)
College \(\times\) Female 0.059 0.08 0.07
(0.24) (17.0) (27.8)
Large \(\times\) Female 0.121 -0.01 -0.01 -0.01 0.02 0.00 0.02
(0.33) (86.7) (82.8) (87.2) (76.8) (99.5) (64.3)
LargeGrace \(\times\) Female 0.114 0.10 0.09 0.09 0.07 0.09 0.07
(0.32) (11.7) (12.1) (11.2) (15.6) (8.1) (12.3)
Cattle \(\times\) Female 0.114 0.06 0.06 0.06 0.07 0.07 0.08
(0.32) (45.2) (28.3) (28.5) (15.8) (18.5) (10.0)
Large \(\times\) Secondary \(\times\) Female 0.041 -0.19 -0.17 -0.18 -0.22 -0.17 -0.21
(0.20) (14.3) (16.5) (12.0) (3.1) (11.0) (2.9)
LargeGrace \(\times\) Secondary \(\times\) Female 0.036 0.04 0.06 0.05 0.05 0.06 0.06
(0.19) (75.8) (60.9) (69.1) (61.8) (60.6) (51.4)
Cattle \(\times\) Secondary \(\times\) Female 0.037 0.01 -0.05 -0.07 -0.04 -0.05 -0.03
(0.19) (91.8) (72.1) (60.9) (76.1) (66.8) (81.6)
Large \(\times\) College \(\times\) Female 0.016 0.11 0.10 0.04 0.16 0.04 0.17
(0.12) (68.8) (63.9) (84.3) (45.5) (81.6) (42.8)
LargeGrace \(\times\) College \(\times\) Female 0.018 -0.06 -0.02 0.05 0.12 0.03 0.11
(0.13) (81.3) (94.6) (81.7) (55.9) (88.9) (58.7)
Cattle \(\times\) College \(\times\) Female 0.010 0.39 0.26 0.22 0.25 0.25 0.27
(0.10) (14.5) (24.3) (26.3) (21.9) (18.6) (18.8)
rd 3 0.343 0.05 0.04 0.06 0.05 0.06 0.05
(0.47) (0.0) (0.1) (0.0) (0.0) (0.0) (0.0)
Secondary \(\times\) rd 3 0.120 -0.01 -0.02 -0.01 -0.02
(0.32) (84.6) (46.7) (87.6) (47.3)
College \(\times\) rd 3 0.055 0.03 0.02 0.02 0.01
(0.23) (49.9) (68.7) (62.0) (79.1)
Large \(\times\) rd 3 0.091 -0.04 -0.04 -0.05 -0.05 -0.05 -0.06
(0.29) (29.4) (28.5) (17.0) (9.9) (17.3) (8.4)
LargeGrace \(\times\) rd 3 0.086 -0.07 -0.07 -0.08 -0.08 -0.08 -0.08
(0.28) (5.5) (3.2) (2.2) (2.6) (2.0) (2.2)
Cattle \(\times\) rd 3 0.089 -0.05 -0.06 -0.06 -0.07 -0.06 -0.06
(0.28) (22.0) (11.0) (11.1) (6.3) (11.2) (7.8)
Large \(\times\) Secondary \(\times\) rd 3 0.028 -0.04 0.00 0.00 -0.01 -0.01 -0.02
(0.17) (64.5) (96.8) (99.5) (89.1) (93.5) (81.4)
LargeGrace \(\times\) Secondary \(\times\) rd 3 0.028 0.05 0.08 0.08 0.06 0.06 0.05
(0.16) (56.2) (33.1) (33.0) (44.4) (43.8) (53.9)
Cattle \(\times\) Secondary \(\times\) rd 3 0.032 0.02 0.06 0.06 0.05 0.06 0.05
(0.18) (82.0) (49.7) (49.6) (58.1) (48.8) (57.7)
Large \(\times\) College \(\times\) rd 3 0.015 0.09 0.05 0.09 -0.01 0.09 -0.01
(0.12) (54.0) (66.2) (44.4) (94.6) (42.2) (93.4)
LargeGrace \(\times\) College \(\times\) rd 3 0.017 -0.04 -0.03 -0.01 -0.04 0.00 -0.04
(0.13) (66.6) (72.5) (89.9) (70.1) (99.4) (72.5)
Cattle \(\times\) College \(\times\) rd 3 0.012 0.05 0.03 0.04 -0.01 0.04 -0.01
(0.11) (74.2) (83.5) (76.8) (95.0) (76.2) (92.7)
Female \(\times\) rd 3 0.155 0.00 0.01
(0.36) (90.1) (69.1)
Large \(\times\) Female \(\times\) rd 3 0.040 0.07 0.06 0.07 0.06 0.07 0.07
(0.20) (29.9) (31.9) (23.3) (27.9) (19.2) (24.6)
LargeGrace \(\times\) Female \(\times\) rd 3 0.039 0.04 0.03 0.03 0.04 0.04 0.04
(0.19) (53.2) (55.6) (59.4) (51.8) (48.6) (43.0)
Cattle \(\times\) Female \(\times\) rd 3 0.040 0.03 0.05 0.05 0.05 0.06 0.06
(0.20) (64.0) (36.2) (37.5) (42.4) (37.6) (41.1)
Large \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.014 0.16 0.16 0.15 0.14 0.19 0.19
(0.12) (43.0) (36.8) (38.8) (30.7) (26.2) (17.3)
LargeGrace \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.012 0.23 0.19 0.21 0.22 0.24 0.26
(0.11) (25.8) (28.8) (23.3) (17.9) (14.9) (9.5)
Cattle \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.012 0.31 0.30 0.29 0.18 0.31 0.22
(0.11) (10.1) (7.8) (9.1) (22.6) (7.5) (14.4)
Large \(\times\) College \(\times\) Female \(\times\) rd 3 0.003 0.29 0.29 0.24 0.08 0.24 0.07
(0.06) (32.4) (20.5) (26.1) (76.4) (25.9) (78.1)
LargeGrace \(\times\) College \(\times\) Female \(\times\) rd 3 0.006 0.08 0.10 -0.05 -0.13 -0.04 -0.12
(0.08) (72.8) (61.7) (78.3) (54.8) (84.0) (58.5)
Cattle \(\times\) College \(\times\) Female \(\times\) rd 3 0.004 -0.43 -0.28 -0.29 -0.30 -0.29 -0.31
(0.06) (16.4) (27.8) (25.7) (28.5) (25.3) (28.4)
Secondary \(\times\) Female \(\times\) rd 3 0.052 -0.00 0.04
(0.22) (97.3) (46.1)
College \(\times\) Female \(\times\) rd 3 0.017 -0.01 -0.02
(0.13) (90.4) (85.6)
rd 4 0.276 0.10 0.08 0.14 0.13 0.14 0.13
(0.45) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary \(\times\) rd 4 0.143 -0.02 -0.03 -0.02 -0.04
(0.35) (58.3) (43.3) (54.9) (40.7)
College \(\times\) rd 4 0.057 0.02 0.00 -0.00 -0.01
(0.23) (61.7) (94.4) (96.0) (84.5)
Large \(\times\) rd 4 0.080 -0.06 -0.04 -0.07 -0.08 -0.08 -0.09
(0.27) (27.2) (49.1) (10.9) (6.0) (8.5) (3.7)
LargeGrace \(\times\) rd 4 0.069 -0.02 -0.01 -0.04 -0.05 -0.04 -0.05
(0.25) (73.9) (84.2) (42.3) (26.3) (40.3) (25.3)
Cattle \(\times\) rd 4 0.067 -0.03 -0.03 -0.05 -0.05 -0.05 -0.05
(0.25) (50.0) (53.4) (27.7) (19.6) (26.3) (18.2)
Large \(\times\) Secondary \(\times\) rd 4 0.036 -0.11 -0.11 -0.04 -0.06 -0.03 -0.06
(0.19) (37.9) (32.6) (68.7) (52.8) (75.6) (53.2)
LargeGrace \(\times\) Secondary \(\times\) rd 4 0.035 0.04 0.02 0.06 0.05 0.04 0.03
(0.18) (75.2) (85.5) (55.4) (64.6) (69.0) (77.0)
Cattle \(\times\) Secondary \(\times\) rd 4 0.037 -0.02 -0.00 0.03 0.01 0.03 0.01
(0.19) (90.8) (97.2) (77.0) (90.8) (80.3) (93.2)
Large \(\times\) College \(\times\) rd 4 0.018 -0.10 -0.14 -0.03 -0.11 -0.02 -0.11
(0.13) (57.5) (34.5) (84.5) (44.0) (85.7) (43.0)
LargeGrace \(\times\) College \(\times\) rd 4 0.015 -0.29 -0.28 -0.23 -0.25 -0.20 -0.23
(0.12) (2.1) (1.7) (4.2) (2.9) (7.0) (3.9)
Cattle \(\times\) College \(\times\) rd 4 0.011 -0.15 -0.13 -0.08 -0.10 -0.05 -0.08
(0.10) (31.8) (29.1) (51.7) (43.4) (65.8) (54.2)
Female \(\times\) rd 4 0.131 -0.07 -0.06
(0.34) (0.5) (1.8)
Large \(\times\) Female \(\times\) rd 4 0.038 0.08 0.12 0.15 0.14 0.16 0.15
(0.19) (25.6) (12.1) (1.1) (3.3) (0.3) (1.3)
LargeGrace \(\times\) Female \(\times\) rd 4 0.034 -0.05 -0.00 -0.00 -0.00 0.00 0.00
(0.18) (51.7) (99.9) (95.7) (95.6) (94.9) (95.1)
Cattle \(\times\) Female \(\times\) rd 4 0.030 0.00 0.09 0.10 0.08 0.11 0.10
(0.17) (99.3) (28.7) (16.0) (19.9) (10.9) (13.2)
Large \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.016 0.22 0.11 0.05 0.11 0.02 0.07
(0.13) (33.7) (56.6) (80.5) (50.1) (90.6) (66.2)
LargeGrace \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.017 0.09 -0.09 -0.06 -0.02 -0.08 -0.03
(0.13) (70.0) (65.8) (73.5) (92.4) (67.0) (84.5)
Cattle \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.018 0.26 0.13 0.11 0.04 0.08 0.02
(0.13) (21.1) (48.6) (56.6) (82.3) (65.1) (91.3)
Large \(\times\) College \(\times\) Female \(\times\) rd 4 0.010 0.14 0.06 0.05 -0.20 -0.01 -0.25
(0.10) (66.7) (80.5) (83.9) (49.7) (96.2) (37.9)
LargeGrace \(\times\) College \(\times\) Female \(\times\) rd 4 0.007 0.37 0.27 0.08 -0.05 0.09 -0.05
(0.08) (18.0) (25.1) (72.7) (84.6) (71.6) (85.6)
Cattle \(\times\) College \(\times\) Female \(\times\) rd 4 0.004 0.03 -0.01 -0.14 -0.19 -0.12 -0.17
(0.06) (94.0) (98.5) (63.4) (54.4) (69.0) (60.6)
Secondary \(\times\) Female \(\times\) rd 4 0.067 -0.01 0.02
(0.25) (88.6) (78.2)
College \(\times\) Female \(\times\) rd 4 0.029 0.14 0.15
(0.17) (15.6) (17.0)
EldestSon 0.267 0.01 0.04
(0.44) (80.4) (23.2)
EldestDaughter 0.188 0.03 0.01
(0.39) (30.8) (77.7)
Flood in round 1 0.464 -0.05 -0.05
(0.50) (4.1) (3.2)
Head literate0 0.108 0.06 0.06
(0.31) (2.2) (2.3)
Head age0 39.153 -0.00 -0.00
(7.38) (17.9) (18.8)
Enrolled0 0.760 0.28 0.32 0.30 0.31 0.29
(0.43) (0.0) (0.0) (0.0) (0.0) (0.0)
ChildAgeOrderAtRd1 1.826 0.02 0.02
(0.98) (28.3) (25.9)
Household size0 4.974 -0.01 -0.01
(1.15) (34.3) (41.1)
T = 2 89 89 89 75 89 75
T = 3 135 135 135 126 135 126
T = 4 539 539 539 500 539 500
R2 0.021 0.160 0.232 0.216 0.240 0.222
Mean of dependent variable 0.88 0.88 0.88 0.88 0.88 0.88
N 1841 1976 1976 1976 1841 1976 1841
Click here to see the table of time varying schooling impacts by functional attribute.

Schooling, TimeVaryingAttributes

covariates mean/std 1 2 3 4 5 6
(Intercept) 0.86 0.65 0.70 0.82 0.69 0.79
(0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary 0.338 -0.14 -0.12 -0.14 -0.12
(0.47) (0.0) (0.0) (0.0) (0.0)
College 0.172 -0.24 -0.21 -0.23 -0.21
(0.38) (0.0) (0.0) (0.0) (0.0)
Upfront 0.776 -0.02 -0.03 -0.04 -0.03 -0.04 -0.03
(0.42) (59.3) (44.7) (23.7) (31.2) (23.9) (29.5)
WithGrace 0.504 -0.01 -0.01 0.00 -0.00 0.00 0.00
(0.50) (79.4) (76.0) (98.5) (90.5) (91.8) (99.8)
InKind 0.257 0.00 -0.01 -0.02 -0.01 -0.02 -0.01
(0.44) (98.6) (87.5) (57.9) (71.2) (58.3) (68.9)
WithGrace \(\times\) Secondary 0.171 -0.13 -0.10 -0.11 -0.13 -0.10 -0.12
(0.38) (6.8) (20.0) (6.3) (5.1) (10.2) (6.3)
Upfront \(\times\) Secondary 0.255 0.08 0.04 0.04 0.05 0.04 0.05
(0.44) (30.4) (61.0) (51.1) (41.6) (52.5) (40.9)
InKind \(\times\) Secondary 0.088 0.05 0.06 0.06 0.08 0.06 0.08
(0.28) (50.9) (44.1) (29.6) (25.1) (31.9) (25.6)
WithGrace \(\times\) College 0.084 -0.06 -0.03 -0.02 -0.07 -0.03 -0.08
(0.28) (60.4) (73.9) (79.4) (34.1) (65.6) (26.8)
Upfront \(\times\) College 0.134 0.07 0.05 0.04 0.10 0.04 0.11
(0.34) (55.8) (68.1) (65.8) (27.9) (56.5) (20.1)
InKind \(\times\) College 0.035 -0.06 -0.03 -0.08 -0.09 -0.06 -0.08
(0.18) (63.9) (81.6) (33.1) (26.4) (40.5) (30.5)
Female 0.450 0.04 0.05
(0.50) (6.1) (8.1)
Secondary \(\times\) Female 0.152 0.10 0.09
(0.36) (0.5) (1.0)
College \(\times\) Female 0.059 0.08 0.07
(0.24) (17.0) (27.8)
WithGrace \(\times\) Female 0.228 0.11 0.10 0.10 0.05 0.09 0.05
(0.42) (13.3) (16.0) (17.0) (43.7) (16.5) (45.6)
Upfront \(\times\) Female 0.349 -0.01 -0.01 -0.01 0.02 0.00 0.02
(0.48) (86.7) (82.8) (87.2) (76.8) (99.5) (64.3)
InKind \(\times\) Female 0.114 -0.05 -0.03 -0.03 0.00 -0.02 0.01
(0.32) (60.2) (71.4) (66.1) (97.2) (70.4) (92.1)
WithGrace \(\times\) Secondary \(\times\) Female 0.074 0.23 0.24 0.22 0.27 0.23 0.27
(0.26) (6.2) (2.2) (2.3) (0.2) (1.0) (0.1)
Upfront \(\times\) Secondary \(\times\) Female 0.115 -0.19 -0.17 -0.18 -0.22 -0.17 -0.21
(0.32) (14.3) (16.5) (12.0) (3.1) (11.0) (2.9)
InKind \(\times\) Secondary \(\times\) Female 0.037 -0.03 -0.11 -0.11 -0.09 -0.11 -0.09
(0.19) (83.3) (33.6) (33.9) (40.4) (30.0) (35.0)
WithGrace \(\times\) College \(\times\) Female 0.028 -0.17 -0.12 0.01 -0.04 -0.02 -0.05
(0.17) (44.3) (53.6) (96.1) (82.9) (91.7) (75.6)
Upfront \(\times\) College \(\times\) Female 0.044 0.11 0.10 0.04 0.16 0.04 0.17
(0.21) (68.8) (63.9) (84.3) (45.5) (81.6) (42.8)
InKind \(\times\) College \(\times\) Female 0.010 0.46 0.27 0.17 0.13 0.22 0.15
(0.10) (4.4) (16.1) (30.4) (44.0) (16.2) (35.2)
rd 3 0.343 0.05 0.04 0.06 0.05 0.06 0.05
(0.47) (0.0) (0.1) (0.0) (0.0) (0.0) (0.0)
Secondary \(\times\) rd 3 0.120 -0.01 -0.02 -0.01 -0.02
(0.32) (84.6) (46.7) (87.6) (47.3)
College \(\times\) rd 3 0.055 0.03 0.02 0.02 0.01
(0.23) (49.9) (68.7) (62.0) (79.1)
WithGrace \(\times\) rd 3 0.175 -0.03 -0.03 -0.04 -0.03 -0.04 -0.03
(0.38) (38.9) (30.8) (27.4) (43.3) (26.6) (42.1)
Upfront \(\times\) rd 3 0.266 -0.04 -0.04 -0.05 -0.05 -0.05 -0.06
(0.44) (29.4) (28.5) (17.0) (9.9) (17.3) (8.4)
InKind \(\times\) rd 3 0.089 0.02 0.01 0.02 0.02 0.03 0.02
(0.28) (62.6) (72.4) (51.6) (68.5) (46.1) (59.5)
WithGrace \(\times\) Secondary \(\times\) rd 3 0.060 0.10 0.08 0.08 0.07 0.07 0.07
(0.24) (31.9) (36.9) (36.1) (42.8) (42.6) (46.0)
Upfront \(\times\) Secondary \(\times\) rd 3 0.088 -0.04 0.00 0.00 -0.01 -0.01 -0.02
(0.28) (64.5) (96.8) (99.5) (89.1) (93.5) (81.4)
InKind \(\times\) Secondary \(\times\) rd 3 0.032 -0.03 -0.02 -0.02 -0.01 0.00 -0.00
(0.18) (76.9) (83.5) (85.9) (89.5) (99.7) (99.1)
WithGrace \(\times\) College \(\times\) rd 3 0.029 -0.13 -0.08 -0.10 -0.03 -0.09 -0.03
(0.17) (27.6) (39.8) (29.5) (76.9) (34.6) (81.3)
Upfront \(\times\) College \(\times\) rd 3 0.044 0.09 0.05 0.09 -0.01 0.09 -0.01
(0.21) (54.0) (66.2) (44.4) (94.6) (42.2) (93.4)
InKind \(\times\) College \(\times\) rd 3 0.012 0.09 0.06 0.05 0.03 0.04 0.02
(0.11) (47.3) (60.4) (67.0) (80.7) (73.8) (85.3)
Female \(\times\) rd 3 0.155 0.00 0.01
(0.36) (90.1) (69.1)
WithGrace \(\times\) Female \(\times\) rd 3 0.079 -0.03 -0.03 -0.03 -0.03 -0.03 -0.03
(0.27) (62.9) (66.0) (54.6) (62.8) (54.4) (64.3)
Upfront \(\times\) Female \(\times\) rd 3 0.119 0.07 0.06 0.07 0.06 0.07 0.07
(0.32) (29.9) (31.9) (23.3) (27.9) (19.2) (24.6)
InKind \(\times\) Female \(\times\) rd 3 0.040 -0.01 0.02 0.02 0.02 0.02 0.01
(0.20) (84.3) (73.6) (73.0) (80.4) (79.6) (85.2)
WithGrace \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.024 0.07 0.03 0.06 0.08 0.05 0.07
(0.15) (69.6) (85.8) (71.3) (63.8) (74.6) (65.0)
Upfront \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.038 0.16 0.16 0.15 0.14 0.19 0.19
(0.19) (43.0) (36.8) (38.8) (30.7) (26.2) (17.3)
InKind \(\times\) Secondary \(\times\) Female \(\times\) rd 3 0.012 0.08 0.11 0.09 -0.04 0.07 -0.05
(0.11) (65.7) (48.6) (60.1) (80.8) (68.9) (75.8)
WithGrace \(\times\) College \(\times\) Female \(\times\) rd 3 0.010 -0.21 -0.20 -0.29 -0.21 -0.27 -0.19
(0.10) (37.6) (34.1) (10.0) (31.1) (12.8) (38.6)
Upfront \(\times\) College \(\times\) Female \(\times\) rd 3 0.013 0.29 0.29 0.24 0.08 0.24 0.07
(0.11) (32.4) (20.5) (26.1) (76.4) (25.9) (78.1)
InKind \(\times\) College \(\times\) Female \(\times\) rd 3 0.004 -0.50 -0.38 -0.23 -0.18 -0.25 -0.19
(0.06) (5.1) (11.4) (28.9) (44.3) (26.5) (42.8)
Secondary \(\times\) Female \(\times\) rd 3 0.052 -0.00 0.04
(0.22) (97.3) (46.1)
College \(\times\) Female \(\times\) rd 3 0.017 -0.01 -0.02
(0.13) (90.4) (85.6)
rd 4 0.276 0.10 0.08 0.14 0.13 0.14 0.13
(0.45) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary \(\times\) rd 4 0.143 -0.02 -0.03 -0.02 -0.04
(0.35) (58.3) (43.3) (54.9) (40.7)
College \(\times\) rd 4 0.057 0.02 0.00 -0.00 -0.01
(0.23) (61.7) (94.4) (96.0) (84.5)
WithGrace \(\times\) rd 4 0.136 0.04 0.03 0.04 0.03 0.04 0.04
(0.34) (36.8) (54.0) (34.8) (40.2) (32.9) (35.9)
Upfront \(\times\) rd 4 0.216 -0.06 -0.04 -0.07 -0.08 -0.08 -0.09
(0.41) (27.2) (49.1) (10.9) (6.0) (8.5) (3.7)
InKind \(\times\) rd 4 0.067 -0.02 -0.02 -0.01 -0.01 -0.01 -0.00
(0.25) (69.7) (60.2) (75.8) (89.8) (77.5) (91.9)
WithGrace \(\times\) Secondary \(\times\) rd 4 0.073 0.14 0.13 0.10 0.11 0.07 0.09
(0.26) (20.4) (18.9) (29.0) (28.9) (47.1) (38.9)
Upfront \(\times\) Secondary \(\times\) rd 4 0.109 -0.11 -0.11 -0.04 -0.06 -0.03 -0.06
(0.31) (37.9) (32.6) (68.7) (52.8) (75.6) (53.2)
InKind \(\times\) Secondary \(\times\) rd 4 0.037 -0.05 -0.03 -0.03 -0.04 -0.01 -0.02
(0.19) (67.3) (82.6) (79.7) (75.2) (90.1) (85.0)
WithGrace \(\times\) College \(\times\) rd 4 0.026 -0.20 -0.14 -0.20 -0.14 -0.18 -0.12
(0.16) (15.7) (24.2) (6.6) (23.2) (8.0) (27.5)
Upfront \(\times\) College \(\times\) rd 4 0.044 -0.10 -0.14 -0.03 -0.11 -0.02 -0.11
(0.21) (57.5) (34.5) (84.5) (44.0) (85.7) (43.0)
InKind \(\times\) College \(\times\) rd 4 0.011 0.14 0.14 0.15 0.15 0.15 0.16
(0.10) (23.1) (13.2) (14.4) (16.9) (9.8) (9.5)
Female \(\times\) rd 4 0.131 -0.07 -0.06
(0.34) (0.5) (1.8)
WithGrace \(\times\) Female \(\times\) rd 4 0.064 -0.14 -0.12 -0.15 -0.14 -0.16 -0.15
(0.24) (10.2) (13.3) (3.2) (3.9) (1.7) (2.9)
Upfront \(\times\) Female \(\times\) rd 4 0.102 0.08 0.12 0.15 0.14 0.16 0.15
(0.30) (25.6) (12.1) (1.1) (3.3) (0.3) (1.3)
InKind \(\times\) Female \(\times\) rd 4 0.030 0.06 0.09 0.10 0.09 0.10 0.09
(0.17) (51.5) (30.6) (20.4) (21.8) (17.3) (18.2)
WithGrace \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.035 -0.12 -0.20 -0.11 -0.13 -0.10 -0.10
(0.18) (57.9) (31.1) (55.8) (45.0) (58.3) (54.1)
Upfront \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.052 0.22 0.11 0.05 0.11 0.02 0.07
(0.22) (33.7) (56.6) (80.5) (50.1) (90.6) (66.2)
InKind \(\times\) Secondary \(\times\) Female \(\times\) rd 4 0.018 0.17 0.21 0.17 0.05 0.16 0.05
(0.13) (42.1) (25.3) (36.6) (75.5) (36.8) (76.7)
WithGrace \(\times\) College \(\times\) Female \(\times\) rd 4 0.010 0.23 0.21 0.04 0.14 0.10 0.21
(0.10) (34.6) (36.7) (88.1) (57.9) (66.1) (41.7)
Upfront \(\times\) College \(\times\) Female \(\times\) rd 4 0.021 0.14 0.06 0.05 -0.20 -0.01 -0.25
(0.14) (66.7) (80.5) (83.9) (49.7) (96.2) (37.9)
InKind \(\times\) College \(\times\) Female \(\times\) rd 4 0.004 -0.34 -0.28 -0.23 -0.14 -0.21 -0.12
(0.06) (30.4) (34.6) (44.0) (62.1) (47.9) (67.8)
Secondary \(\times\) Female \(\times\) rd 4 0.067 -0.01 0.02
(0.25) (88.6) (78.2)
College \(\times\) Female \(\times\) rd 4 0.029 0.14 0.15
(0.17) (15.6) (17.0)
EldestSon 0.267 0.01 0.04
(0.44) (80.4) (23.2)
EldestDaughter 0.188 0.03 0.01
(0.39) (30.8) (77.7)
Flood in round 1 0.464 -0.05 -0.05
(0.50) (4.1) (3.2)
Head literate0 0.108 0.06 0.06
(0.31) (2.2) (2.3)
Head age0 39.153 -0.00 -0.00
(7.38) (17.9) (18.8)
Enrolled0 0.760 0.28 0.32 0.30 0.31 0.29
(0.43) (0.0) (0.0) (0.0) (0.0) (0.0)
ChildAgeOrderAtRd1 1.826 0.02 0.02
(0.98) (28.3) (25.9)
Household size0 4.974 -0.01 -0.01
(1.15) (34.3) (41.1)
T = 2 89 89 89 75 89 75
T = 3 135 135 135 126 135 126
T = 4 539 539 539 500 539 500
R2 0.021 0.160 0.232 0.216 0.240 0.222
Mean of dependent variable 0.88 0.88 0.88 0.88 0.88 0.88
N 1841 1976 1976 1976 1841 1976 1841
Click here to see the table of schooling impacts by poverty class.

Schooling, PovertyStatus

covariates mean/std 1 2 3 4 5 6
(Intercept) 0.93 0.70 0.76 0.90 0.74 0.86
(0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Secondary 0.338 -0.11 -0.09 -0.11 -0.09
(0.47) (0.0) (0.0) (0.0) (0.0)
College 0.172 -0.21 -0.18 -0.19 -0.18
(0.38) (0.0) (0.0) (0.0) (0.0)
Upfront 0.776 -0.05 -0.04 -0.05 -0.05 -0.04 -0.05
(0.42) (17.7) (10.8) (8.2) (8.6) (10.5) (9.4)
WithGrace 0.504 -0.01 -0.01 -0.00 -0.00 -0.00 -0.00
(0.50) (81.7) (76.7) (98.7) (92.8) (91.9) (91.6)
InKind 0.257 -0.01 -0.01 -0.02 -0.02 -0.02 -0.01
(0.44) (81.2) (75.6) (47.5) (64.0) (54.6) (68.0)
UltraPoor 0.612 0.04 0.03 0.03 0.03 0.03 0.03
(0.49) (10.6) (22.0) (21.2) (22.9) (21.2) (20.4)
WithGrace \(\times\) Secondary 0.171 -0.07 -0.09 -0.06 -0.08
(0.38) (9.3) (5.4) (11.4) (5.9)
Upfront \(\times\) Secondary 0.255 -0.00 0.01 -0.00 0.01
(0.44) (99.2) (84.5) (97.5) (88.4)
InKind \(\times\) Secondary 0.088 0.06 0.07 0.06 0.08
(0.28) (14.5) (11.8) (13.2) (9.1)
WithGrace \(\times\) College 0.084 -0.05 -0.07 -0.05 -0.08
(0.28) (41.1) (26.0) (37.0) (18.0)
Upfront \(\times\) College 0.134 0.01 0.03 0.02 0.05
(0.34) (80.2) (68.4) (69.4) (46.2)
InKind \(\times\) College 0.035 -0.09 -0.10 -0.05 -0.06
(0.18) (23.0) (18.3) (40.2) (38.8)
Upfront \(\times\) UltraPoor 0.514 -0.04 -0.02 -0.01 0.00 -0.01 -0.00
(0.50) (69.1) (78.1) (91.1) (99.2) (89.1) (97.8)
WithGrace \(\times\) UltraPoor 0.350 -0.02 0.00 0.00 0.02 -0.01 0.01
(0.48) (79.2) (97.6) (96.9) (74.1) (94.1) (84.9)
InKind \(\times\) UltraPoor 0.186 0.01 0.03 0.01 -0.02 0.03 0.01
(0.39) (80.0) (58.3) (77.4) (72.4) (52.8) (85.2)
Secondary \(\times\) UltraPoor 0.215 -0.02 -0.04 -0.03 -0.03 -0.03 -0.03
(0.41) (59.5) (30.4) (36.1) (40.6) (32.4) (35.5)
College \(\times\) UltraPoor 0.103 0.09 0.04 0.04 0.05 0.06 0.05
(0.30) (19.8) (48.4) (40.1) (39.5) (25.6) (32.4)
Female 0.450 0.05 0.05
(0.50) (2.7) (4.9)
Secondary \(\times\) Female 0.152 0.08 0.08
(0.36) (0.6) (1.3)
College \(\times\) Female 0.059 0.12 0.11
(0.24) (1.3) (4.4)
Female \(\times\) UltraPoor 0.276 0.07 0.07
(0.45) (7.3) (7.2)
WithGrace \(\times\) Female 0.228 0.07 0.03
(0.42) (24.9) (61.9)
Upfront \(\times\) Female 0.349 -0.00 0.02
(0.48) (96.2) (74.8)
InKind \(\times\) Female 0.114 -0.02 0.01
(0.32) (76.0) (87.5)
WithGrace \(\times\) Secondary \(\times\) Female 0.074 0.19 0.23
(0.26) (0.6) (0.1)
Upfront \(\times\) Secondary \(\times\) Female 0.115 -0.10 -0.12
(0.32) (27.1) (17.4)
InKind \(\times\) Secondary \(\times\) Female 0.037 -0.04 -0.04
(0.19) (61.7) (57.6)
WithGrace \(\times\) College \(\times\) Female 0.028 -0.09 -0.08
(0.17) (46.5) (57.4)
Upfront \(\times\) College \(\times\) Female 0.044 0.06 0.09
(0.21) (63.9) (53.4)
InKind \(\times\) College \(\times\) Female 0.010 0.22 0.18
(0.10) (12.7) (26.6)
EldestSon 0.267 0.00 0.04
(0.44) (94.0) (31.0)
EldestDaughter 0.188 0.04 0.01
(0.39) (22.2) (70.9)
Flood in round 1 0.464 -0.04 -0.05
(0.50) (4.4) (2.5)
Head literate0 0.108 0.06 0.05
(0.31) (2.3) (2.9)
Head age0 39.153 -0.00 -0.00
(7.38) (10.6) (11.2)
Enrolled0 0.760 0.29 0.32 0.29 0.31 0.29
(0.43) (0.0) (0.0) (0.0) (0.0) (0.0)
ChildAgeOrderAtRd1 1.826 0.02 0.02
(0.98) (22.9) (27.4)
Household size0 4.974 -0.02 -0.01
(1.15) (19.7) (36.0)
T = 2 89 89 89 75 89 75
T = 3 135 135 135 126 135 126
T = 4 539 539 539 500 539 500
R2 0.008 0.151 0.209 0.201 0.225 0.212
Mean of dependent variable 0.88 0.88 0.88 0.88 0.88 0.88
N 1841 1976 1976 1976 1841 1976 1841

Repayment and net saving

In estimating impacts on repayment and saving, we use borrower only data AllMeetingsRepaymentInitialSample.rds (group meeting data) saved in the above.

Click here to see the code in tabulating group meeting member information.
arA <- readRDS(paste0(pathsaveHere, DataFileNames[2], "InitialSample.rds"))
if (Only800) arA <- arA[o800 == 1L & !grepl("tw|dou", TradGroup) & 
  !is.na(LoanYear), ]
#### EffectiveRepayment := value.repay + value.NetSaving
arA[, Arm := droplevels(Arm)]
arA[, HeadLiteracy := HeadLiteracy + 0]
setorder(arA, hhid, Date)
arA[, grepout("^Time$", colnames(arA)) := NULL]
table0(arA[LoanMonth == 1, .(LoanYear, Arm)])
table0(arA[, .(survey, Arm)])
#### 0 NAs in `CumRepaid`, so skip.
#### table0(arA[is.na(CumRepaid), .(tee, Arm)])

Tabulation of group meeting data at rd 1 (12th month):

addmargins(table0(arA[o800 == 1L & tee == 12, .(Mstatus, Arm)]))
              Arm
Mstatus        traditional large large grace cattle Sum
  gErosion               0     0           0      0   0
  gRejection             0     0           0      0   0
  iRejection             0     0           0      0   0
  iReplacement           0     0           0      0   0
  newGroup               0     0           0      0   0
  oldMember             85   171         167    153 576
  Sum                   85   171         167    153 576
Click here to see the code of repayment and saving regressions.
source(paste0(pathprogram, "ReadTrimRepaymentANCOVA.R"))
FileName <- "Repayment"
FileNameHeader <- c("", "PovertyStatus", "Attributes", 
  "TimeVarying", "TimeVaryingPovertyStatus", "TimeVaryingAttributes")
####  length(arsuffixes) = Number of est results tables to be produced
regsuffixes <- c("", "P", "a", "T", "TP", "Ta")
listheader <- paste0("sv", regsuffixes)
#### net saving (2), repayment (2), and a mean/std column for table
Regressands <-  c(rep(c("NetSaving", "Repaid"), each = 3), "Repaid")
Addseparatingcols = c(1, 4); Separatingcolwidth = rep(.1, 2)
Separatingcoltitle = c("", "Net saving", "Repayment"
#### We omit net saving + repayment as regressand because it is repetitive
#### , "\\mpage{3cm}{\\hfil Net saving \\\\\\hfil + repayment}"
)
#### If LY*arm, LY*attribute interactions are used, we have a singular matrix
source(paste0(pathprogram, "RepaymentCovariateSelectionANCOVA.R"))
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
#### jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
jay <- 7 
#### arA: all individuals, arA2: only borrowers (but arA=arA2, so redundant)
DataToUse1 <- DataToUse2 <- rep(c("arA", "arA2"), each = jay)
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- CreateHTMLTable <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the table of time varying repayment impacts by arm.

Repayment, TimeVarying

covariates mean/std 1 2 3 4
(Intercept) 55.8 50.0 216.6 222.6
(0.0) (0.0) (0.0) (0.0)
Large 0.297 9.0 8.8 93.1 93.4
(0.46) (5.2) (4.7) (0.0) (0.0)
LargeGrace 0.291 32.7 33.3 59.0 56.7
(0.45) (0.0) (0.0) (0.1) (0.1)
Cattle 0.264 33.8 34.0 43.2 41.7
(0.44) (0.0) (0.0) (0.4) (0.4)
LY3 0.258 -46.0 -46.0 154.6 154.9
(0.44) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) LY3 0.077 -14.0 -13.8 30.1 29.7
(0.27) (3.6) (3.7) (13.9) (14.6)
LargeGrace \(\times\) LY3 0.075 -69.0 -69.3 317.7 318.3
(0.26) (0.0) (0.0) (0.0) (0.0)
Cattle \(\times\) LY3 0.069 -67.8 -67.9 309.3 309.9
(0.25) (0.0) (0.0) (0.0) (0.0)
LY4 0.233 -62.2 -62.3 29.7 29.2
(0.42) (0.0) (0.0) (21.1) (22.2)
Large \(\times\) LY4 0.069 -20.4 -20.0 -128.9 -129.7
(0.25) (1.7) (1.7) (2.7) (2.7)
LargeGrace \(\times\) LY4 0.068 -70.2 -70.5 -62.1 -63.5
(0.25) (0.0) (0.0) (28.7) (27.8)
Cattle \(\times\) LY4 0.061 -66.4 -66.4 25.2 24.8
(0.24) (0.0) (0.0) (69.8) (70.4)
Flood in round 1 0.477 1.6 -11.9
(0.50) (61.9) (1.8)
Head literate0 0.122 2.4 10.3
(0.33) (34.9) (12.5)
Net saving0 355.719 0.0 0.0
(513.67) (3.0) (4.0)
Household size0 4.241 0.2 -0.1
(1.38) (77.3) (91.5)
Repaid0 98.890 -0.0 -0.0
(195.66) (85.3) (86.5)
R2 0.102 0.102 0.061 0.061
Mean of dependent variable 54 54 318 318
N 26627 26758 26627 26758 26627
Note: Columns 1. - 2. show results for net saving, 3. - 4. show results for repayment.
Click here to see the table of time varying repayment impacts by arm and by poverty class.

Repayment, TimeVaryingPovertyStatus

covariates mean/std 1 2 3 4
(Intercept) 60.5 54.0 207.5 213.3
(0.0) (0.0) (0.0) (0.0)
Large 0.297 7.5 7.4 77.8 78.1
(0.46) (13.7) (13.3) (0.0) (0.0)
LargeGrace 0.291 22.4 23.0 90.0 87.5
(0.45) (0.0) (0.0) (0.0) (0.0)
Cattle 0.264 23.6 23.9 72.6 70.8
(0.44) (0.0) (0.0) (0.1) (0.1)
UltraPoor 0.714 2.4 2.6 -3.9 -3.2
(0.45) (5.9) (4.7) (28.6) (39.9)
Large \(\times\) UltraPoor 0.208 -5.9 -6.1 12.8 12.9
(0.41) (16.1) (16.4) (45.8) (47.3)
LargeGrace \(\times\) UltraPoor 0.210 -4.4 -4.1 10.9 9.7
(0.41) (29.0) (34.3) (53.9) (60.2)
Cattle \(\times\) UltraPoor 0.191 -1.1 -1.5 5.2 6.9
(0.39) (79.8) (73.1) (76.7) (70.4)
Large \(\times\) rd 2 0.077 -5.5 -4.8 100.4 100.3
(0.27) (84.0) (86.0) (2.4) (2.5)
LargeGrace \(\times\) rd 2 0.075 -88.1 -88.0 516.2 517.4
(0.26) (0.6) (0.6) (0.0) (0.0)
Cattle \(\times\) rd 2 0.069 -61.6 -61.7 450.0 451.1
(0.25) (6.4) (6.3) (0.0) (0.0)
UltraPoor \(\times\) rd 2 0.184 -1.3 -0.9 -5.6 -6.2
(0.39) (81.8) (86.9) (39.4) (35.2)
Large \(\times\) UltraPoor \(\times\) rd 2 0.054 6.1 7.2 -32.6 -32.8
(0.23) (60.8) (54.0) (5.2) (5.3)
LargeGrace \(\times\) UltraPoor \(\times\) rd 2 0.054 14.9 15.0 8.0 9.9
(0.23) (25.1) (24.7) (65.2) (59.0)
Cattle \(\times\) UltraPoor \(\times\) rd 2 0.050 11.4 11.5 -8.8 -11.7
(0.22) (52.6) (52.4) (60.7) (49.6)
LY3 0.258 -46.0 -46.0 155.0 155.0
(0.44) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 3 0.153 -15.5 -14.3 22.1 22.2
(0.36) (70.1) (72.0) (78.3) (78.1)
LargeGrace \(\times\) rd 3 0.150 -139.0 -138.7 700.2 698.7
(0.36) (0.2) (0.2) (0.0) (0.0)
Cattle \(\times\) rd 3 0.137 -119.1 -118.5 648.3 646.1
(0.34) (1.1) (1.1) (0.0) (0.0)
UltraPoor \(\times\) rd 3 0.369 -3.8 -3.9 12.1 14.0
(0.48) (50.7) (50.1) (11.9) (7.6)
Large \(\times\) UltraPoor \(\times\) rd 3 0.107 6.2 7.9 -23.1 -23.2
(0.31) (53.1) (43.3) (39.7) (39.4)
LargeGrace \(\times\) UltraPoor \(\times\) rd 3 0.108 -1.1 -0.6 22.1 19.7
(0.31) (93.6) (96.6) (44.7) (49.4)
Cattle \(\times\) UltraPoor \(\times\) rd 3 0.099 -8.9 -11.4 22.6 33.1
(0.30) (60.2) (50.8) (46.4) (29.2)
Large \(\times\) LY3 0.077 -4.1 -4.4 60.8 60.2
(0.27) (82.3) (80.8) (19.1) (19.1)
LargeGrace \(\times\) LY3 0.075 -4.3 -4.7 29.1 31.0
(0.26) (81.6) (79.5) (53.0) (49.9)
Cattle \(\times\) LY3 0.069 -5.7 -6.2 30.1 32.6
(0.25) (76.3) (74.0) (52.7) (49.0)
UltraPoor \(\times\) LY3 0.184 0.8 1.0 -8.3 -10.3
(0.39) (75.1) (67.2) (29.0) (20.0)
Large \(\times\) UltraPoor \(\times\) LY3 0.054 5.7 5.3 -1.4 -2.0
(0.23) (47.5) (51.0) (94.4) (92.2)
LargeGrace \(\times\) UltraPoor \(\times\) LY3 0.054 6.2 5.5 -12.0 -8.8
(0.23) (44.1) (48.3) (61.7) (71.3)
Cattle \(\times\) UltraPoor \(\times\) LY3 0.050 7.9 9.9 16.6 6.2
(0.22) (30.1) (20.3) (44.9) (78.4)
LY4 0.233 -62.3 -62.3 31.0 30.2
(0.42) (0.0) (0.0) (18.9) (20.2)
Large \(\times\) rd 4 0.026 -2.8 -1.6 -145.4 -148.1
(0.16) (94.2) (96.8) (55.3) (54.4)
LargeGrace \(\times\) rd 4 0.025 -124.1 -123.7 455.1 449.3
(0.16) (0.4) (0.4) (5.8) (6.0)
Cattle \(\times\) rd 4 0.023 -105.8 -105.2 418.6 414.2
(0.15) (1.7) (1.8) (10.5) (10.8)
UltraPoor \(\times\) rd 4 0.061 3.4 3.3 -76.4 -75.0
(0.24) (65.0) (66.0) (2.5) (2.9)
Large \(\times\) UltraPoor \(\times\) rd 4 0.018 13.3 15.2 -119.4 -124.0
(0.13) (36.1) (30.2) (38.2) (36.2)
LargeGrace \(\times\) UltraPoor \(\times\) rd 4 0.018 24.0 24.5 15.7 6.4
(0.13) (17.5) (16.7) (90.3) (96.1)
Cattle \(\times\) UltraPoor \(\times\) rd 4 0.017 -15.6 -18.1 -72.1 -51.3
(0.13) (37.4) (30.9) (60.2) (71.3)
Large \(\times\) LY4 0.069 -15.0 -15.2 -37.9 -38.0
(0.25) (38.0) (37.0) (67.2) (66.9)
LargeGrace \(\times\) LY4 0.068 -11.0 -11.5 -261.7 -260.1
(0.25) (52.2) (50.2) (0.4) (0.4)
Cattle \(\times\) LY4 0.061 -9.0 -9.5 -169.8 -167.4
(0.24) (60.7) (58.6) (8.9) (9.1)
UltraPoor \(\times\) LY4 0.166 -0.6 -0.4 -8.6 -10.5
(0.37) (77.3) (87.7) (49.8) (41.2)
Large \(\times\) UltraPoor \(\times\) LY4 0.048 6.7 6.4 9.1 9.7
(0.21) (36.0) (38.4) (74.1) (72.3)
LargeGrace \(\times\) UltraPoor \(\times\) LY4 0.049 5.1 4.5 -28.5 -25.4
(0.22) (53.7) (58.1) (37.1) (42.2)
Cattle \(\times\) UltraPoor \(\times\) LY4 0.044 7.0 9.0 4.3 -7.6
(0.21) (34.6) (23.6) (92.0) (86.0)
Flood in round 1 0.477 1.6 -11.6
(0.50) (61.8) (2.7)
Head literate0 0.122 2.5 10.1
(0.33) (34.3) (15.5)
Net saving0 355.719 0.0 0.0
(513.67) (3.1) (4.1)
Household size0 4.241 0.2 -0.2
(1.38) (74.6) (89.5)
Repaid0 98.890 -0.0 -0.0
(195.66) (21.4) (21.9)
R2 0.126 0.126 0.114 0.114
Mean of dependent variable 54 54 318 318
N 26627 26758 26627 26758 26627
Note: Columns 1. - 2. show results for net saving, 3. - 4. show results for repayment.

Effective repayment (repayment + net saving)

Arm no yes sum FullRepayRate
traditional 47 38 85 44.71
large 11 160 171 93.57
large grace 5 162 167 97.01
cattle 7 146 153 95.42
overall 70 506 576 87.85

Incomes

Income sources are mainly labour incomes (lab) and farm revenues (far) with 849 and 53 observations at baseline, respectively. We ignore farm incomes due to small number of observations.

Click here to see the code of labour income impacts estimation.
source(paste0(pathprogram, "ReadTrimIncomeANCOVA.R"))
FileName <- "LabourIncome"
#### Regression types
FileNameHeader <- c("", "PovertyStatus", "Attributes",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "a", "P", "T", "Ta", "TP", "TPa")
listheader <- paste0("lb", regsuffixes)
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
#### Regression specifications: Selecting covariates
source(paste0(pathprogram, "LabourIncomeCovariateSelectionANCOVA3.R"))
#### Number of regression specifications = jay
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
Regressands <- c(rep("TotalHHLabourIncome", 6))
DataToUse1 <- DataToUse2 <- rep("lab", 6)
Addseparatingcols = NULL; Separatingcolwidth = NULL
Separatingcoltitle = NULL
#### Use livestock data to attach NumCows0, HadCows, livestock values
source(paste0(pathprogram, "ReadTrimIncomeANCOVA.R"))
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the table of time varying labour income impacts by arm.

LabourIncome, TimeVarying

covariates mean/std 1 2 3 4 5 6
(Intercept) -8816.85 -7430.78 -62547.07 -62677.75 -62495.27 -62763.21
(11.6) (18.0) (0.0) (0.0) (0.0) (0.0)
Large 0.278 57.86 -423.32 -4123.79 -3650.26 -3671.96 -3644.75
(0.45) (99.4) (95.3) (52.0) (57.1) (56.8) (57.2)
LargeGrace 0.248 -1640.12 -6062.81 -5711.80 -5623.68 -5680.42 -5618.50
(0.43) (83.4) (39.3) (28.6) (27.4) (28.2) (27.5)
Cattle 0.254 -2639.37 -3736.48 -3779.51 -3437.02 -3936.97 -3470.55
(0.44) (72.4) (60.2) (52.0) (55.7) (50.8) (55.3)
HadCattle 0.182 -6243.86 -4304.91
(0.39) (4.3) (46.2)
rd 3 0.343 12756.19 12656.12 12527.04 12455.94 12511.17 12453.48
(0.47) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 3 0.094 -5829.95 -5631.78 -3203.30 -3356.01 -3365.26 -3349.47
(0.29) (35.6) (36.7) (57.7) (56.7) (55.8) (56.8)
LargeGrace \(\times\) rd 3 0.085 936.02 238.98 2477.92 2021.13 2397.09 2021.63
(0.28) (88.8) (97.1) (67.3) (72.8) (68.2) (72.8)
Cattle \(\times\) rd 3 0.086 -8803.54 -8036.22 -4730.16 -4955.94 -4659.65 -4955.97
(0.28) (27.0) (29.7) (49.8) (47.6) (50.2) (47.6)
rd 4 0.326 23425.62 23178.45 23358.08 23196.86 23281.62 23187.90
(0.47) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 4 0.095 10206.37 10316.22 12236.73 12423.59 12155.38 12455.76
(0.29) (43.8) (43.3) (34.5) (34.8) (34.6) (34.6)
LargeGrace \(\times\) rd 4 0.082 -32.79 -995.65 1417.26 944.34 1313.79 951.48
(0.27) (99.7) (89.4) (83.7) (88.9) (84.8) (88.8)
Cattle \(\times\) rd 4 0.081 -6838.00 -6698.93 -2219.15 -3239.63 -2454.82 -3267.38
(0.27) (49.5) (50.2) (81.2) (71.8) (79.3) (71.6)
HadCattle 0.182 -6243.86 -4304.91
(0.39) (4.3) (46.2)
HadCattle \(\times\) Large 0.062 7668.70 7737.34
(0.24) (36.6) (36.3)
HadCattle \(\times\) LargeGrace 0.041 2053.10 2088.17
(0.20) (80.2) (80.0)
HadCattle \(\times\) Cattle 0.042 15462.97 15316.35
(0.20) (11.1) (11.4)
HadCattle \(\times\) rd 3 0.063 -2822.82 -2835.09
(0.24) (51.5) (51.4)
HadCattle \(\times\) Large \(\times\) rd 3 0.020 -4048.82 -4027.17
(0.14) (80.4) (80.7)
HadCattle \(\times\) LargeGrace \(\times\) rd 3 0.014 -11496.21 -11499.33
(0.12) (50.3) (50.5)
HadCattle \(\times\) Cattle \(\times\) rd 3 0.016 -2998.49 -3021.18
(0.12) (85.9) (85.8)
HadCattle \(\times\) rd 4 0.058 -12206.87 -12251.58
(0.23) (5.0) (4.9)
HadCattle \(\times\) Large \(\times\) rd 4 0.021 -17854.54 -17704.72
(0.14) (35.9) (36.1)
HadCattle \(\times\) LargeGrace \(\times\) rd 4 0.013 -8432.04 -8411.57
(0.11) (51.9) (51.9)
HadCattle \(\times\) Cattle \(\times\) rd 4 0.012 -21790.20 -21969.19
(0.11) (20.4) (20.5)
Flood in round 1 0.488 6929.81 6851.29 6972.80 6875.29
(0.50) (15.4) (16.1) (15.3) (15.9)
Head literate0 0.113 -6779.24 -6184.79 -6024.13 -6167.96
(0.32) (21.3) (22.4) (26.2) (22.6)
TotalHHLabourIncome0 2397.862 0.11 0.09 0.09 0.09 0.09
(172385.37) (0.0) (0.0) (0.0) (0.0) (0.0)
Household size0 4.405 12181.57 12408.28 12439.85 12426.66
(1.53) (0.0) (0.0) (0.0) (0.0)
Number of cattle0 0.250 -5434.02 -1421.91
(0.60) (2.5) (71.4)
R2 0.013 0.065 0.119 0.119 0.121 0.118
Mean of dependent variable 2233 2233 2233 2233 2233 2233
N 2557 2566 2566 2557 2557 2557 2557

Consumption

Consumption is observed in rd 2-4. There are 1386 observations. As we lack the initial value, we use OLS using rd 2- 4 values to measure the impacts. It should be less precise but still gives consistent estimates.

Regression specifications differ in terms of regressand and covariates. For regressands, we use per capita expenditure for (1) - (2), total expenditure for (3) - (4). (1), (3) are OLS with no covariates, (2), (4) are OLS with covariates. (5) is a dummy entry used only to compute mean and standard deviation.

Click here to see the code of consumption impacts OLS estimation.
source(paste0(pathprogram, "ReadTrimConsumptionANCOVA.R"))
# Page 6 of rd 4 questionnaire.
FileName <- "ConsumptionOLS"
regsuffixes <- c("", "a", "P", "T", "Ta", "TP", "TPa")
listheader <- paste0("co", regsuffixes)
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
source(paste0(pathprogram, "ConsumptionCovariateSelectionOLS.R"))
#### jay: number of reg specs. This defines table dimension.
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
Regressands <- c(rep("PCExpenditure", 3), rep("TotalExpenditure", 3),
  "PCExpenditure")
DataToUse1 <- DataToUse2 <- rep("conOLS", 7)
Addseparatingcols = NULL; Separatingcolwidth = NULL
Separatingcoltitle = c("", "Per capita consumption (Tk)", 
  "Total consumption (Tk)")
dig.depmean <- 0
AddMeanStdColumn <- T
UseRawDataForDestat <- F
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the table of OLS time varying consumption impacts by arm.

ConsumptionOLS, TimeVarying

covariates mean/std 1 2
(Intercept) 2202.0 3179.3
(0.0) (0.0)
Large 0.283 -24.8 30.0
(0.45) (70.7) (63.3)
LargeGrace 0.255 -9.2 21.2
(0.44) (87.7) (75.6)
Cattle 0.265 -36.6 -5.6
(0.44) (54.8) (92.3)
rd 3 0.340 558.1 552.3
(0.47) (0.0) (0.0)
Large \(\times\) rd 3 -0.001 131.6 122.9
(0.21) (22.6) (25.6)
LargeGrace \(\times\) rd 3 -0.001 -80.0 -81.7
(0.21) (42.4) (41.3)
Cattle \(\times\) rd 3 0.000 170.7 142.7
(0.21) (8.1) (14.5)
rd 4 0.322 660.0 659.0
(0.47) (0.0) (0.0)
Large \(\times\) rd 4 0.003 124.3 104.1
(0.21) (18.2) (24.2)
LargeGrace \(\times\) rd 4 0.003 -18.3 -33.6
(0.20) (84.1) (70.1)
Cattle \(\times\) rd 4 -0.001 12.7 -22.7
(0.21) (87.4) (76.6)
Flood in round 1 0.480 -43.5
(0.50) (18.9)
Head literate0 0.119 -9.2
(0.32) (76.4)
T = 2 28 28
T = 3 96 96
T = 4 1277 1274
R2 0.137 0.324
Mean of dependent variable 2586 2586
N 77 4051 4042

Net assets: Assets+Livestock-GUK Debt-Other Debts

Net assets = Assets + net saving - debt to GUK - debts to relatives and money lenders. Assets use only items observed for all 4 rounds for household assets including radios and cassette players (which may have large measurement errors).

source(paste0(pathprogram, "ComputeNetAssetsANCOVA.R"))
Click here to see the code of net asset regressions.
FileName <- "NetAssets"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
    "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
listheader <- paste0("nea", regsuffixes)
library(qs)
source(paste0(pathprogram, "NetAssetCovariateSelectionANCOVA2.R"))
####  number of regressions per specification k=1, ..., length(regsuffixes)
NeA1 <- readRDS(paste0(pathsaveHere, "NetAssetsRegData.rds"))
if (Only800) NeA1 <- NeA1[o800 == 1L, ]
NeA1[, grepout("Net2|Na|Br|^R|Pro|PAss", colnames(NeA1)) := NULL]
####  ls(pattern = "^incl\\d"): created in NetAssetCovariateSelectionANCOVA2.R 
####  "incl1" "incl2" "incl3" "incl4" "incl5" "incl6"
####  So jay = 6, 6 reg specifications in estimation. 1 is OLS, 2-6 are ANCOVA.
####   incl1: ^dummy[CI].*[ed]$|^dummy[LW].*[cgz]e$|dummy.*Poor$
####   incla1: ^dummy[CI].*[ed]$|^dummy[LW].*[cgz]e$|dummy.*Poor$
####   inclP1: ^dummy[CI].*[ed]$|^dummy[LW].*[cgz]e$|dummy.*Poor$
####   inclT1: ^(?=dummy[CI].*[ed].*|^dummy[LW].*[cgz]e.*|^Time\\.)(?!.*Had)
####   inclTa1: ^(?=dummy[CI].*[ed].*|^dummy[LW].*[cgz]e.*|^Time\\.)(?!.*Had)
####   inclTPa1: ^(?=dummy[CI].*[ed]|^dummy[LW].*[cgz]e.*|^Time\\.|^d.*Poor)(?!.*Had)
####  Data=NeA1. It is created in MergeAllNetAssetsANCOVA.R
####  Below is the snippets of it.
####      ass <- readRDS(paste0(pathsaveHere, DataFileNames[4], "Trimmed.rds"))
####      obr <- readRDS(paste0(pathsaveHere, DataFileNames[11], "Trimmed.rds"))
####      arA <- readRDS(paste0(pathsaveHere, DataFileNames[2], "Trimmed.rds"))
####      lvo <- readRDS(paste0(pathsaveHere, DataFileNames[5], "InitialSample.rds"))
####      asso <- obr[ass]
####      assD <- asso[!is.na(IntDate), .(Arm, BStatus, hhid, survey, IntDate)]
####      arD <- arA[, .(hhid, survey, tee, Date, AttritIn, CumLoanAmount, 
####      arDebt <- assDW[arD]
####      assoD <- arDebtW[asso]
####      ass1R <- assoD[, 
####          grepout(paste0(assstrings, "|RM"), colnames(assoD)), with = F]
####      NeA1R <- merge(ass1R, lvo1, by = commoncols, all.x = T)
####      NeA1 <- NeA1R[tee > 1, ]
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
DataToUse1 <- DataToUse2 <- rep("NeA1", jay)
####  Previously, Rd 1-4 diff: DataToUse2 <- rep("NeA2", jay)
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
Regressands <- rep("NetValue", jay)
tableboxwidth <- 4.5
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
ktft <- TabVariableDescription
Click here to see the code of plotting net assets.
library(ggplot2)
####  NetAssetsFigureData.rds created in ComputeNetAssetsANCOVA.rnw
NeAfig <- readRDS(paste0(pathsaveHere, "NetAssetsFigureData.rds"))
if (Only800) NeAfig <- NeAfig[o800 == 1L, ]
d2 <- subset(NeAfig, !is.na(Arm))
ColourForPoints <- c("darkblue", "darkred")
g <- ggplot(data = subset(d2, tee == 2 & 0 <= NetValue & NetValue < 100000), 
  aes(x=NarrowNetValue, fill = povertystatus)) + 
  geom_histogram(bins=50, alpha=.5, position="identity",
    aes(x = NetValue, y = ..density..)) +
  scale_x_log10() +
  theme(
    axis.text.x = element_text(size = 6), 
    axis.text.y = element_text(size = 6), 
    axis.title = element_text(size = 7), 
    legend.key.size = unit(.15, "cm"),
    legend.text = element_text(size = 6),
    legend.title = element_text(size = 6),
    legend.position = "bottom")
ggsave(
  paste0(pathprogram, "figure/EstimationMemo/NetAssetsAtRd1.png"),
  g,
  width = 12, height = 6, units = "cm",
  dpi = 300
 )
####  postscript does not support transparency.
####  setEPS()
####  postscript(file =  
####    paste0(pathprogram, 
####      "figure/ImpactEstimationOriginal1600Memo3/NetAssetsAtRd1.eps"),
####    , width = 5, height = 2.5, horizontal = F) # unit: inch
####  print(g)
####  dev.off()
pdf(file =  
  paste0(pathprogram, "figure/EstimationMemo/NetAssetsAtRd1.pdf"),
  , width = 8/2.54, height = 5/2.54, pointsize = 10) # native unit: inch
print(g)
whatever <- dev.off()
library(ggplot2)
####  NetAssetsFigureData.rds created in ComputeNetAssetsANCOVA.rnw
NeAfig <- readRDS(paste0(pathsaveHere, "NetAssetsFigureData.rds"))
if (Only800) NeAfig <- NeAfig[o800 == 1L, ]
d2 <- subset(NeAfig, !is.na(Arm))
d2[, Type := "net assets"]
g <- ggplot(data = d2) + 
  geom_boxplot(aes(x= factor(tee), y = NetValue, colour = povertystatus), 
    outlier.alpha = 0.1)+
  scale_x_discrete(name = "survey round") +
  scale_y_continuous(name = "asset values (Tk.)",
    breaks = seq(0, 100000, 10000), limits = c(0, 100000)) +
  theme(
   axis.text.x = element_text(size = 6), 
   axis.text.y = element_text(size = 6), 
   axis.title = element_text(size = 7), 
   strip.text.x = element_text(color = "blue", size = 6, 
     margin = margin(0, .5, 0, .5, "cm")), 
   strip.text.y = element_text(color = "blue", size = 6, 
     margin = margin(.5, 0, .5, 0, "cm")),
   legend.position = "bottom") +
  facet_grid(. ~ Arm)
ggsave(
  paste0(pathprogram, 
    "figure/EstimationMemo/NetAssets.jpg"),
  g,
  width = 12, height = 6, units = "cm",
  dpi = 300*4
 )
pdf(file =  
  paste0(pathprogram, 
    "figure/EstimationMemo/NetAssets.pdf"),
  , width = 8/2.54, height = 5/2.54, pointsize = 10) # native unit: inch
print(g)
whatever <- dev.off()
Click here to see the table of time varying net asset impacts by arm. Net assets impacts by arm and period

NetAssets, TimeVarying

covariates mean/std 1 2 3 4 5 6
(Intercept) 12646.9 10282.5 2299.9 8022.1 3297.9 6994.4
(0.0) (0.0) (58.9) (9.8) (47.0) (15.5)
Large 0.048 10890.6 10623.8 10381.9 6523.4 10458.4 6586.4
(0.46) (0.1) (0.6) (1.0) (8.6) (1.4) (8.6)
LargeGrace 0.006 3096.2 1570.8 1737.2 -142.5 1685.6 -291.9
(0.43) (25.7) (64.3) (60.1) (96.4) (62.1) (92.7)
Cattle 0.009 2868.1 2107.0 2201.4 135.8 2761.9 215.5
(0.44) (12.1) (45.3) (43.5) (96.2) (32.7) (93.9)
HadCattle 0.265 7844.7 10322.0
(0.44) (20.3) (11.8)
rd 3 0.342 5516.3 5585.3 5867.5 8494.7 7501.6 8592.1
(0.47) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 3 0.104 1007.0 2841.9 3332.8 2191.4 3249.5 2519.2
(0.30) (77.4) (51.1) (45.0) (65.3) (45.3) (60.6)
LargeGrace \(\times\) rd 3 0.085 7093.3 9543.1 9847.3 10981.5 9269.2 10942.2
(0.28) (2.6) (2.5) (2.0) (1.8) (3.3) (1.9)
Cattle \(\times\) rd 3 0.087 3318.1 4812.6 4884.2 5346.2 5803.4 5332.1
(0.28) (26.3) (17.6) (16.5) (16.3) (7.2) (16.5)
rd 4 0.315 10249.0 10180.6 10359.3 14091.2 12042.9 14153.5
(0.46) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 4 0.102 3806.0 5738.0 5501.7 4129.9 5601.6 4453.6
(0.30) (40.0) (21.0) (23.1) (37.8) (21.5) (34.2)
LargeGrace \(\times\) rd 4 0.080 9491.2 12706.0 12955.7 15469.4 12581.3 15375.2
(0.27) (0.4) (0.2) (0.2) (0.1) (0.3) (0.1)
Cattle \(\times\) rd 4 0.079 7611.9 9021.9 9239.7 9955.1 10302.6 9753.9
(0.27) (2.1) (1.3) (1.0) (0.8) (0.2) (0.9)
HadCattle 0.265 7844.7 10322.0
(0.44) (20.3) (11.8)
HadCattle \(\times\) Large 0.024 17624.6 17922.7
(0.25) (11.2) (10.5)
HadCattle \(\times\) LargeGrace 0.009 7123.7 7883.5
(0.23) (32.2) (26.1)
HadCattle \(\times\) Cattle -0.012 11774.6 11719.1
(0.21) (8.6) (7.9)
HadCattle \(\times\) rd 3 0.092 -4533.7 -4613.9
(0.29) (11.0) (10.2)
HadCattle \(\times\) Large \(\times\) rd 3 0.008 3450.3 3020.9
(0.15) (69.2) (72.8)
HadCattle \(\times\) LargeGrace \(\times\) rd 3 0.003 -24243.5 -24292.4
(0.14) (1.1) (1.1)
HadCattle \(\times\) Cattle \(\times\) rd 3 -0.004 -3368.5 -3444.3
(0.12) (65.9) (65.1)
HadCattle \(\times\) rd 4 0.084 -2318.8 -2443.7
(0.28) (54.3) (52.1)
HadCattle \(\times\) Large \(\times\) rd 4 0.009 818.9 665.8
(0.14) (94.2) (95.2)
HadCattle \(\times\) LargeGrace \(\times\) rd 4 0.004 -29993.9 -29696.8
(0.13) (1.7) (1.8)
HadCattle \(\times\) Cattle \(\times\) rd 4 -0.005 -7135.7 -6917.8
(0.11) (45.5) (46.7)
Flood in round 1 0.414 91.1 1956.7 377.2 2134.2
(0.49) (96.7) (41.3) (87.7) (39.4)
Head literate0 0.149 -746.3 -1625.8 -2035.7 -1618.0
(0.36) (78.5) (58.6) (47.3) (59.1)
NetValue0 10261.899 0.5 0.5 0.2 0.6 0.7
(15197.09) (0.0) (0.0) (38.7) (5.5) (4.7)
Household size0 4.538 1797.5 1341.8 1633.0 1273.0
(1.35) (3.1) (15.2) (6.6) (17.1)
Number of cattle0 0.380 -2867.9 -12092.9
(0.73) (66.8) (15.4)
T = 2 42 13 13 13 10 13
T = 3 133 82 79 38 40 36
T = 4 550 362 362 327 362 327
R2 0.057 0.132 0.139 0.138 0.127 0.141
Mean of dependent variable 22717 22717 22717 22717 22717 22717
N 1081 1958 1263 1257 1070 1176 1066

Note: Head literate is an indicator variable of household head literacy. Head age is age of household head. Household size is total number of household members. Flood at baseline is an indicator variable of flood exposure. Household asset amount and Productive asset amount are amount of non-livestock household and productive assets, respectively, in BDT. Livestock value is BDT value of all livestock holding beyond cattle. Number of cattle holding is number of cattle holding. Net asset value is net asset values in BDT using asset items observed in all 4 rounds. Broad net asset value is net asset values in BDT for all asset items. Attrited indicates attrition rates in the household survey, and GRejected and IRejected show group rejection rates and individual rejection rates to the lending program. Non-attriting borrowers indicates the ratio of non-attriting borrowers to all borrowers. Because attrition and rejection are separate events, a household can reject and attrit, so non-attrited borrowers \(\geqslant\) total - (rejected members + attrited members). USD 1 is about BDT 80.

Net non-livestock assets: Non-livestock assets-GUK Debt-Other Debts

Net non-livestock assets = Non livestock assets + net saving - debt to GUK - debts to relatives and money lenders.

Click here to see the code and results table of net non-livestock assets.
FileName <- "NetNLAssets"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
    "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
listheader <- paste0("nl", regsuffixes)
source(paste0(pathprogram, "NetNLAssetCovariateSelectionANCOVA2.R"))
NeA1 <- readRDS(paste0(pathsaveHere, "NetAssetsRegData.rds"))
NeA1[, grepout("Net2?Va|Out|Adi|Own", colnames(NeA1)) := NULL]
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
DataToUse1 <- DataToUse2 <- rep("NeA1", jay)
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
Regressands <- rep("NetNLAssetValue", jay)
tableboxwidth <- 4.5
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
if (Only800) NeA1 <- NeA1[o800 == 1L, ]
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))

NetNLAssets, TimeVarying

covariates mean/std 1 2 3 4 5 6
(Intercept) -3523.5 -3661.1 -3578.0 -3908.8 -3447.2 -3966.9
(0.0) (0.1) (0.1) (0.0) (0.1) (0.0)
Large 0.048 227.7 906.4 1162.6 1240.8 1256.7 1240.6
(0.46) (85.2) (54.2) (42.8) (40.9) (39.1) (41.2)
LargeGrace 0.006 -2232.2 -2125.7 -2217.7 -2624.6 -2247.0 -2629.4
(0.43) (6.5) (22.2) (18.4) (11.1) (17.6) (11.1)
Cattle 0.009 -1841.4 -1460.1 -1329.8 -1643.8 -1520.5 -1681.7
(0.44) (4.1) (19.7) (23.5) (14.2) (17.0) (13.8)
HadCattle 0.265 -665.3 268.3
(0.44) (55.3) (89.2)
rd 3 0.342 4562.1 4985.7 4996.5 5370.0 5072.1 5388.3
(0.47) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 3 0.104 3281.8 2238.6 2235.5 1787.9 2233.7 1852.4
(0.30) (0.5) (19.9) (20.2) (37.3) (20.5) (35.8)
LargeGrace \(\times\) rd 3 0.085 7802.8 7792.1 7785.8 8343.5 7659.7 8341.9
(0.28) (0.0) (0.1) (0.1) (0.1) (0.1) (0.1)
Cattle \(\times\) rd 3 0.087 5329.4 4223.4 4245.3 3988.8 3963.6 3986.5
(0.28) (0.0) (1.2) (1.2) (4.1) (2.1) (4.1)
rd 4 0.315 7527.5 7723.5 7734.6 7895.3 7645.7 7904.8
(0.46) (0.0) (0.0) (0.0) (0.0) (0.0) (0.0)
Large \(\times\) rd 4 0.102 3825.9 3044.2 2943.9 2865.1 3055.2 2905.4
(0.30) (1.1) (11.8) (13.3) (13.3) (11.9) (12.9)
LargeGrace \(\times\) rd 4 0.080 8200.2 8302.3 8174.3 9231.2 8094.4 9236.4
(0.27) (0.0) (0.1) (0.1) (0.0) (0.2) (0.0)
Cattle \(\times\) rd 4 0.079 7534.9 6436.0 6419.1 6444.4 5890.8 6441.1
(0.27) (0.0) (0.1) (0.1) (0.1) (0.2) (0.1)
HadCattle 0.265 -665.3 268.3
(0.44) (55.3) (89.2)
HadCattle \(\times\) Large 0.024 2386.6 2262.8
(0.25) (49.1) (51.5)
HadCattle \(\times\) LargeGrace 0.009 6685.1 6663.2
(0.23) (8.9) (8.8)
HadCattle \(\times\) Cattle -0.012 5578.7 5428.7
(0.21) (5.9) (7.3)
HadCattle \(\times\) rd 3 0.092 58.9 51.4
(0.29) (97.3) (97.6)
HadCattle \(\times\) Large \(\times\) rd 3 0.008 -1111.6 -1171.7
(0.15) (85.6) (84.9)
HadCattle \(\times\) LargeGrace \(\times\) rd 3 0.003 -8868.6 -8883.2
(0.14) (18.0) (17.8)
HadCattle \(\times\) Cattle \(\times\) rd 3 -0.004 -3749.8 -3765.7
(0.12) (53.4) (53.2)
HadCattle \(\times\) rd 4 0.084 1180.3 1175.7
(0.28) (56.1) (56.3)
HadCattle \(\times\) Large \(\times\) rd 4 0.009 -2954.3 -2958.0
(0.14) (64.3) (64.4)
HadCattle \(\times\) LargeGrace \(\times\) rd 4 0.004 -11657.5 -11648.0
(0.13) (12.0) (12.2)
HadCattle \(\times\) Cattle \(\times\) rd 4 -0.005 -4660.8 -4704.6
(0.11) (46.7) (46.2)
Flood in round 1 0.414 -1538.6 -1532.3 -1732.7 -1522.9
(0.49) (3.8) (6.6) (2.7) (7.1)
Head literate0 0.149 145.2 -8.8 210.2 0.1
(0.36) (80.8) (99.0) (72.5) (100.0)
NetAssetValue0 2657.829 0.1 0.1 0.2 0.2 0.2
(2852.68) (1.3) (1.1) (6.1) (9.6) (6.9)
Household size0 4.538 96.4 169.2 96.9 185.9
(1.35) (70.1) (55.1) (72.7) (52.7)
Number of cattle0 0.380 -422.3 -660.9
(0.73) (48.2) (54.7)
T = 2 42 13 13 13 10 13
T = 3 133 82 79 38 40 36
T = 4 550 362 362 327 362 327
R2 0.139 0.111 0.114 0.113 0.113 0.113
Mean of dependent variable -219 -219 -219 -219 -219 -219
N 1081 1958 1263 1257 1070 1176 1066

Cattle holding

In ReadTrimLivestockByExperienceANCOVA.R:

source(paste0(pathprogram, "ReadTrimLivestockByExperienceANCOVA.R"))
lvoEN = copy(lvoE)
Click here to see the code of cattle holding impacts estimation.
FileName <- "NumCows"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
listheader <- paste0("nae", regsuffixes)
source(paste0(pathprogram, "NumCowsCovariateSelectionANCOVA2.R"))
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
DataToUse1 <- DataToUse2 <- rep("lvoEN", 7)
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
Regressands <- rep("NumCows", jay)
tableboxwidth <- 4.5
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
#### source(paste0(pathprogram, "DisplayCovariates.R"))
dig.depmean <- 2
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the results table on net non-livestock assets..

NumCows, TimeVarying

covariates mean/std 1 2 3 4
(Intercept) 1.47 1.36 1.12 1.11
(0.0) (0.0) (0.0) (0.0)
Large 0.273 0.39 0.37 0.35 0.35
(0.45) (0.6) (0.4) (0.8) (0.8)
LargeGrace 0.248 0.01 0.02 0.02 0.03
(0.43) (94.3) (88.5) (83.9) (82.5)
Cattle 0.264 -0.05 -0.03 -0.03 -0.03
(0.44) (44.1) (72.3) (67.5) (69.1)
HadCattle 0.195 0.14
(0.40) (45.4)
rd 3 0.348 -0.02 0.00 0.00 0.01
(0.48) (71.4) (96.9) (93.8) (91.5)
Large \(\times\) rd 3 0.094 -0.05 -0.05 -0.05 -0.05
(0.29) (74.9) (75.5) (77.9) (77.2)
LargeGrace \(\times\) rd 3 0.085 0.19 0.20 0.21 0.21
(0.28) (28.5) (25.5) (24.9) (25.1)
Cattle \(\times\) rd 3 0.091 0.17 0.16 0.16 0.15
(0.29) (18.0) (23.6) (24.6) (25.3)
rd 4 0.326 0.16 0.18 0.19 0.19
(0.47) (0.9) (0.5) (0.4) (0.4)
Large \(\times\) rd 4 0.094 0.05 0.04 0.05 0.05
(0.29) (74.5) (79.1) (78.2) (78.7)
LargeGrace \(\times\) rd 4 0.081 0.40 0.39 0.40 0.40
(0.27) (3.3) (3.6) (3.0) (3.0)
Cattle \(\times\) rd 4 0.085 0.34 0.34 0.35 0.35
(0.28) (0.8) (1.1) (1.1) (1.2)
HadCattle 0.195 0.14
(0.40) (45.4)
Flood in round 1 0.491 0.05 0.05
(0.50) (57.2) (56.4)
Head literate0 0.114 0.02 0.02
(0.32) (85.6) (87.2)
Number of cattle0 0.266 0.31 0.29 0.21
(0.62) (0.2) (0.6) (21.4)
Household size0 4.219 0.05 0.05
(1.43) (3.7) (3.8)
Livestock value 5315.315
(12450.23)
T = 2 87 87 85 85
T = 3 168 168 168 168
T = 4 395 395 395 395
R2 0.040 0.086 0.089 0.089
Mean of dependent variable 1.62 1.62 1.62 1.62
N 1998 1608 1608 1606 1606

Net broad assets: Broad assets+Livestock-GUK Debt-Other Debts

Net broad assets = Broad assets + net saving - debt to GUK - debts to relatives and money lenders.

Click here to see the code of net broad asset impacts and annual price net asset impacts estimation.
NeA1 <- readRDS(paste0(pathsaveHere, "NetAssetsRegData.rds"))
# Drop confusing variables
NeA1[, grepout("^NetValue|Narrow|^R", colnames(NeA1)) := NULL]
FileName <- "NetBroadAssets"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
    "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
listheader <- paste0("nea", regsuffixes)
source(paste0(pathprogram, "NetBroadAssetCovariateSelectionANCOVA2.R"))
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
DataToUse1 <- DataToUse2 <- rep("NeA1", jay)
if (Only800) NeA1 <- NeA1[o800 == 1L, ]
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
Regressands <- rep("NetBroadValue", jay)
tableboxwidth <- 4.5
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- T
NeA1[, grepout("Net2", colnames(NeA1)) := NULL]
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))

We also examine net asset annual price ANCOVA estimation.

NeA1R <- readRDS(paste0(pathsaveHere, "NetAssetsANCOVATrimmed.rds"))
NeA1R2 <- readRDS(paste0(pathsaveHere, "NetAssetsANCOVA.rds"))
if (UseTrimmedSample) NeA1 <- NeA1R2[tee > 1, ] else NeA1 <- NeA1R[tee > 1, ]
NeA1[, grepout("RM|NetV", colnames(NeA1)) := NULL]
FileName <- "NetAssetsAnnualPrices"
Regressands <- rep("Net2Value", jay)
if (Only800) NeA1 <- NeA1[o800 == 1L, ]
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "NetAssetCovariateSelectionANCOVA2.R"))
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))

Net assets, experienced vs. inexperienced

We attach cattle rearing experience information to net assets.

Click here to see the code that produces LivestockExperienceAtBaseline.rds.
fnlv <- read.dta13(fnlv0, generate.factors = T, nonint.factors = T)
fnlv <- data.table(fnlv)
####  Page 20 of rd 1 questionnaire
####  ownership 
####  s8a_a_1: own cow/ox/goat
####  s8a_a_2: own adult cow
####  s8a_a_3: own adult ox
####  s8a_a_4: own calf
####  adi lease 
####  s8a_b_7: lease cow/ox/goat
####  s8a_b_8: lease adult cow
####  s8a_b_9: lease adult ox
####  s8a_b_10: lease calf
####  s8a_b_26: last year of adi
####  s8a_b_27_1: reason discontinuing adi
####  s8a_b_27_2: reason discontinuing adi, other
setnames(fnlv, paste0("s8a_a_", 1:4), 
  paste0("Own", c("Lvstk", "Cow", "Ox", "Calf")))
setnames(fnlv, paste0("s8a_b_", 7:10), 
  paste0("LeaseIn", c("Lvstk", "Cow", "Ox", "Calf")))
setnames(fnlv, paste0("s8a_a_", c(26, "27_1", "27_2")), 
  c("YearsSinceLastAdi", "ReasonStopAdi", "ReasonStopAdiOther"))
fnlv[, OwnCattle := 0L]
fnlv[grepl("Y", OwnLvstk)&(OwnCow>0|OwnOx>0|OwnCalf>0), 
  OwnCattle := 1L]
fnlv[, LeaseInCattle := 0L]
fnlv[grepl("Y", LeaseInLvstk)&(LeaseInCow>0|LeaseInOx>0|LeaseInCalf>0), 
  LeaseInCattle := 1L]
fnlv[, LeaseInCattle := sum(LeaseInCattle)>0, by = hh_id]
fnlv[, OwnCattle := sum(OwnCattle)>0, by = hh_id]
addmargins(table0(fnlv[, .(LeaseInCattle, YearsSinceLastAdi)]))
addmargins(table0(fnlv[!(LeaseInCattle), .(ReasonStopAdi, ReasonStopAdiOther)]))
####  copy nonNA in YearsSinceLastAdi within HH
fnlv[hh_id %in% hh_id[!is.na(YearsSinceLastAdi)], 
  YearsSinceLastAdi := YearsSinceLastAdi[!is.na(YearsSinceLastAdi)][1], by = hh_id]
LvEx <- unique(fnlv[, .(hh_id, OwnCattle, LeaseInCattle, YearsSinceLastAdi)])
setnames(LvEx, "hh_id", "hhid")
saveRDS(LvEx, paste0(pathsaveHere, "LivestockExperienceAtBaseline.rds"))
Click here to see the code that defines LeaseInCattle (renamed as AdiCattle later).
####  Below data is created in ReadTrimLivestockANCOVA.R 
####  in livestock regression preparation
lvo0 <- readRDS(paste0(pathsaveHere, "NumCowRegData.rds"))
LvEx <- readRDS(paste0(pathsaveHere, "LivestockExperienceAtBaseline.rds"))
lv00 <- unique(lvo0[, .(hhid, o800, NumCows0)])
setkey(lv00, hhid); setkey(LvEx, hhid)
lvLv <- LvEx[lv00]
####  NAs in LeaseInCattle, OwnCattle are due to missing obs in stata file: fnlv0
#### addmargins(table0(lvLv[o800==1L, .(NumCows0, LeaseInCattle)]))

Tabulation of cattle lease-in and its experience at baseline.

addmargins(table0(lvLv[o800==1L, .(YearsSinceLastAdi, LeaseInCattle)]))
                 LeaseInCattle
YearsSinceLastAdi   0   1 <NA> Sum
             1      3   0    0   3
             2     13   0    0  13
             3      8   0    0   8
             <NA> 654  94    2 750
             Sum  678  94    2 774

Even LeaseInCattle \(==\) 0 & OwnCattle \(==\) 0, some had Adi experiences.

addmargins(table0(lvLv[o800==1L & LeaseInCattle == 0, .(YearsSinceLastAdi, OwnCattle)]))
                 OwnCattle
YearsSinceLastAdi   0   1 Sum
             1      1   2   3
             2     11   2  13
             3      6   2   8
             <NA> 483 171 654
             Sum  501 177 678

Recode LeaseInCattle if OwnCattle == 0 & \(!\)is.na(YearsSinceLastAdi). This means, LeaseInCattle is given the value of 1 if OwnCattle = 0 but has experience of Adi in last 3 years.

If we (and we will) assume that the NumCows0 (computed from abu_livestockownershipupdated.dta) as the truth, there are 52 false positives in OwnCattle (falsely reporting cattle ownership at baseline).

addmargins(table0(lvLv[o800==1L, .(NumCows0, OwnCattle)]))
        OwnCattle
NumCows0   0   1 <NA> Sum
     0   581  52    0 633
     1     0 100    1 101
     2     0  30    0  30
     3     0   6    0   6
     4     0   2    1   3
     5     0   1    0   1
     Sum 581 191    2 774
Click here to see the code that corrects number of cattle and LeaseInCattle.

NumCows are computed in read_clean_data.rnw by:

xloL[, NumCows := as.integer(NA)]  
xloL[grepl("ow", LVcode), NumCows := as.integer(number_owned)]  
xloL[, NumCows := NumCows[grepl("ow", LVcode)], by = .(hhid, survey)]  

xloL is the raw data file abu_livestockownershipupdated.dta.

We will correct baseline data such that it becomes consistent with abu_livestockownershipupdated.dta. We define a binary variable OwnCattle and drop NumCows0. Dropping NumCows0 is only for net asset by experience estimation. We still use NumCows0 for cattle by experience estimation.

lvLv[NumCows0 == 0 & OwnCattle == 1L, OwnCattle := 0L]  
lvLv[NumCows0 > 0 & is.na(OwnCattle), OwnCattle := 1L]  
lvLv[, NumCows0 := NULL]

We will also correct LeaseInCattle from NA to 0, if NumCows0 \(>0\) (2 cases). Save it as LivestockExperienceAtBaselineCorrected.rds, and use it in estimation as shown below.

lvLv[NumCows0 == 0 & OwnCattle == 1L, OwnCattle := 0L]
lvLv[NumCows0 > 0 & is.na(OwnCattle), OwnCattle := 1L]
lvLv[NumCows0 > 0 & is.na(LeaseInCattle), LeaseInCattle := 0L]
lvLv[, NumCows0 := NULL]
lvLv[OwnCattle == 0L & !is.na(YearsSinceLastAdi), LeaseInCattle := 1L]
addmargins(table0(lvLv[o800==1L & LeaseInCattle == 0L, .(YearsSinceLastAdi, OwnCattle)]))
                 OwnCattle
YearsSinceLastAdi   0   1 Sum
             1      0   2   2
             2      0   2   2
             3      0   2   2
             <NA> 521 135 656
             Sum  521 141 662
addmargins(table0(lvLv[o800==1L, .(LeaseInCattle, OwnCattle)]))
             OwnCattle
LeaseInCattle   0   1 Sum
          0   521 141 662
          1   112   0 112
          Sum 633 141 774
saveRDS(lvLv, paste0(pathsaveHere, "LivestockExperienceAtBaselineCorrected.rds"))

Estimation uses data called NeA1 created in MergeAllNetAssetsExperienceANCOVA.R. Below shows how they are created:

Click here to see the code of net assets impacts by experiece.
source(paste0(pathprogram, "MergeAllNetAssetsExperienceANCOVA.R"))
FileName <- "NetAssetsExperience"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
listheader <- paste0("nae", regsuffixes)
source(paste0(pathprogram, "NetAssetExperienceCovariateSelectionANCOVA2.R"))
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
NeAE1 <- readRDS(paste0(pathsaveHere, "NetAssetsExperienceRegData.rds"))
NeAE1[, grepout("Net2|^Narr", colnames(NeAE1)) := NULL]
DataToUse1 <- DataToUse2 <- rep("NeAE1", jay)
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
Regressands <- rep("NetValue", jay)
tableboxwidth <- 4.5
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
if (Only800) NeAE1 <- NeAE1[o800 == 1L, ]
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the code of net assets impacts by experiece subgroup.
FileName0 <- "NetAssetsByExperience"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
NeAE1 <- readRDS(paste0(pathsaveHere, "NetAssetsExperienceRegData.rds"))
NeAE1[, grepout("Net2|^Narr", colnames(NeAE1)) := NULL]
if (Only800) NeAE1 <- NeAE1[o800 == 1L, ]
NeAE1o <- NeAE1[OwnCattle0 == 1L, ]
NeAE1a <- NeAE1[AdiCattle0 == 1L, ]
NeAE1n <- NeAE1[!(OwnCattle0 == 1L | AdiCattle0 == 1L), ]
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
tableboxwidth <- 4.5
dig.depmean <- 0
FileNameHeader <- c("", "PovertyStatus", "Attributes",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
for (mm in c("a", "o", "n"))
{
  CreateHTMLTable <- T
  listheader <- paste0("naBe", mm, regsuffixes)
  FileName <- paste0(FileName0, mm)
  source(paste0(pathprogram, "NetAssetByExperienceCovariateSelectionANCOVA2.R"))
  # No dummyHadCow or NumCattle0, reg spec m = 1, .., jay(= 4)
  jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
  DataToUse1 <- DataToUse2 <- rep(paste0("NeAE1", mm), jay)
  Regressands <- rep("NetValue", jay)
  AddMeanStdColumn <- UseRawDataForDestat <- T
  source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
}
centerBox <- 1.1
for (k in 1:length(listheader)) {
  etba <- get(paste0("etba", k)) # adi subsample
  etbo <- get(paste0("etbo", k)) # own subsample
  etbn <- get(paste0("etbn", k)) # no adi nor own subsample
  ##  etba[, 1][!etba[, 1] %in% etbo[, 1]]: only etba has UP and its time interactions
  etb1 <- cbind(
    etba[, 1:2], etbo[, 2], etbn[, 2], 
    etba[, 3], etbo[, 3], etbn[, 3]
    )
  etb2 <- cbind(
    etba[, c(1, 4)], etbo[, 4], etbn[, 4], 
    etba[, 5], etbo[, 5], etbn[, 5]
    )
  ltb1 <- latextab(etb1, 
    hleft = "\\scriptsize\\hfil$", 
    hcenter = c(3.25, rep(centerBox, ncol(etb1)-1)), hright = "$", 
    headercolor = "gray80", adjustlineskip = "-.6ex", delimiterline= NULL,
    alternatecolor2 = "gray90", 
    addseparatingcols = 3, 
    separatingcolwidth = .05, 
    separatingcoltitle = c("mean/std", "(1)"), 
    addsubcoltitlehere = T)
  ltb2 <-  latextab(etb2, 
    hleft = "\\scriptsize\\hfil$", 
    hcenter = c(3.25, rep(centerBox, ncol(etb2)-1)), hright = "$", 
    headercolor = "gray80", adjustlineskip = "-.6ex", delimiterline= NULL,
    alternatecolor2 = "gray90", 
    addseparatingcols = c(3), 
    separatingcolwidth = .05, 
    separatingcoltitle = c("(2)", "(3)"), 
    addsubcoltitlehere = T)
####   ltb1[2] <- paste0(ltb1[2], "\\rowcolor{gray80}")
####   ltb2[2] <- paste0(ltb2[2], "\\rowcolor{gray80}")
  ltb1 <- c(
    ltb1[1:3, ],
    paste(
      "\\rowcolor{gray80}&", 
      paste(
        c(paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}")
        , "",
        paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}"))
        , collapse = "&")
      , "\\\\[-.0ex]", collapse = ""),
    ltb1[-(1:4), ]
    )
  ltb2 <- c(
    ltb2[1:3, ],
    paste(
      "\\rowcolor{gray80}&", 
      paste(
        c(paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}")
        , "",
        paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}"))
        , collapse = "&")
      , "\\\\[-.6ex]", collapse = ""),
    ltb2[-(1:4), ]
    )
  write.tablev(ltb1, 
    paste0(pathsaveHere, FileName0, 1, 
      FileNameHeader[k], "ANCOVAEstimationResults.tex")
    , colnamestrue = F)
  write.tablev(ltb2, 
    paste0(pathsaveHere, FileName0, 2, 
      FileNameHeader[k], "ANCOVAEstimationResults.tex")
    , colnamestrue = F)
}
Click here to see the table on net asset impacts of owners. Net assets: Owners

NetAssetsByExperienceo, TimeVarying

covariates mean/std 1 2 3 4
(Intercept) 27409.7 21652.1 21758.4 21758.4
(0.0) (1.4) (12.5) (12.5)
Large 0.343 21672.9 22742.5 23397.4 23397.4
(0.48) (1.0) (3.7) (3.7) (3.7)
LargeGrace 0.269 10698.8 6710.7 7870.4 7870.4
(0.44) (4.5) (28.2) (23.0) (23.0)
Cattle 0.202 7598.3 8695.5 9309.2 9309.2
(0.40) (12.1) (13.6) (11.6) (11.6)
rd 3 0.343 -213.2 58.2 729.8 729.8
(0.48) (93.6) (98.4) (79.5) (79.5)
Large \(\times\) rd 3 0.114 -795.1 -733.2 899.9 899.9
(0.32) (92.5) (93.6) (92.3) (92.3)
LargeGrace \(\times\) rd 3 0.091 -12060.0 -14784.7 -14244.5 -14244.5
(0.29) (18.9) (14.8) (16.7) (16.7)
Cattle \(\times\) rd 3 0.071 -3022.4 -1784.8 -1935.2 -1935.2
(0.26) (69.3) (83.3) (82.1) (82.1)
rd 4 0.327 395.2 2214.8 2220.8 2220.8
(0.47) (90.1) (51.7) (51.5) (51.5)
Large \(\times\) rd 4 0.114 4756.1 1553.1 1053.4 1053.4
(0.32) (62.9) (88.6) (92.4) (92.4)
LargeGrace \(\times\) rd 4 0.091 -9613.7 -14395.7 -13720.6 -13720.6
(0.29) (32.9) (22.8) (25.2) (25.2)
Cattle \(\times\) rd 4 0.061 1293.0 1204.4 845.8 845.8
(0.24) (87.5) (90.1) (93.2) (93.2)
Flood in round 1 0.444 1288.0 1288.0
(0.50) (82.4) (82.4)
Head literate0 0.165 -3614.3 -3614.3
(0.37) (53.2) (53.2)
NetValue0 31070.976 0.2 0.2 0.2
(15261.17) (26.2) (29.1) (29.1)
Household size0 4.586 -380.9 -380.9
(1.41) (88.0) (88.0)
T = 2 6 1 1 1
T = 3 17 11 9 9
T = 4 113 92 92 92
R2 0.054 0.070 0.062 0.062
Mean of dependent variable 39185 39185 39185 39185
N 297 379 299 295 295
Click here to see the table on net asset impacts of adi. Net assets: Adi

NetAssetsByExperiencea, TimeVarying

covariates mean/std 1 2 3 4
(Intercept) 26892.0 31829.0 3882.8 3882.8
(0.0) (0.0) (74.2) (74.2)
Large 0.327 2749.7 -1183.5 -3319.5 -3319.5
(0.47) (59.1) (85.9) (60.3) (60.3)
LargeGrace 0.135 1949.7 -1798.0 -2794.4 -2794.4
(0.34) (75.5) (89.5) (78.9) (78.9)
Cattle 0.316 1985.9 -3240.6 -3402.0 -3402.0
(0.47) (66.0) (61.8) (63.7) (63.7)
rd 3 0.345 -977.4 -2205.1 -1217.6 -1217.6
(0.48) (71.3) (53.4) (72.3) (72.3)
Large \(\times\) rd 3 0.111 -8254.5 -2352.8 -2595.9 -2595.9
(0.32) (36.9) (83.8) (82.1) (82.1)
LargeGrace \(\times\) rd 3 0.047 -1387.6 18024.1 19783.2 19783.2
(0.21) (82.5) (2.6) (0.2) (0.2)
Cattle \(\times\) rd 3 0.111 -3657.0 4495.1 3908.1 3908.1
(0.32) (50.7) (40.5) (44.4) (44.4)
rd 4 0.333 921.9 881.3 2324.8 2324.8
(0.47) (79.6) (87.3) (68.1) (68.1)
Large \(\times\) rd 4 0.111 -601.7 2635.2 2269.7 2269.7
(0.32) (95.4) (82.9) (85.4) (85.4)
LargeGrace \(\times\) rd 4 0.047 5087.7 28494.3 30131.0 30131.0
(0.21) (62.0) (12.5) (10.3) (10.3)
Cattle \(\times\) rd 4 0.105 -767.4 4039.4 5068.8 5068.8
(0.31) (90.9) (51.4) (41.3) (41.3)
Flood in round 1 0.526 -10818.3 -10818.3
(0.50) (2.3) (2.3)
Head literate0 0.135 6543.4 6543.4
(0.34) (37.6) (37.6)
NetValue0 1344.942 0.7 0.7 0.7
(6621.59) (0.8) (0.1) (0.1)
Household size0 4.573 7114.2 7114.2
(1.24) (0.5) (0.5)
T = 2 9 2 2 2
T = 3 18 10 10 10
T = 4 83 48 48 48
R2 -0.031 -0.018 0.105 0.105
Mean of dependent variable 28555 28555 28555 28555
N 171 294 166 166 166
Click here to see the table on net asset impacts of others. Net assets: Others

NetAssetsByExperiencen, TimeVarying

covariates mean/std 1 2 3 4
(Intercept) 13260.5 12537.5 4176.1 4176.1
(0.0) (0.0) (26.4) (26.4)
Large 0.262 10201.1 10945.5 10379.3 10379.3
(0.44) (0.0) (0.0) (0.1) (0.1)
LargeGrace 0.253 5386.3 6652.8 6186.8 6186.8
(0.44) (3.6) (2.9) (4.3) (4.3)
Cattle 0.271 5126.8 3695.7 3145.2 3145.2
(0.44) (2.7) (19.4) (26.0) (26.0)
rd 3 0.354 3679.8 3679.9 3846.2 3846.2
(0.48) (0.0) (0.8) (0.7) (0.7)
Large \(\times\) rd 3 0.090 -3863.7 -2643.4 -2637.7 -2637.7
(0.29) (17.0) (46.5) (46.9) (46.9)
LargeGrace \(\times\) rd 3 0.088 2699.0 5097.1 5230.4 5230.4
(0.28) (29.1) (19.8) (19.1) (19.1)
Cattle \(\times\) rd 3 0.098 -2475.6 -1924.8 -1778.2 -1778.2
(0.30) (39.5) (59.7) (62.3) (62.3)
rd 4 0.335 4520.5 3812.7 3994.3 3994.3
(0.47) (0.0) (0.9) (0.7) (0.7)
Large \(\times\) rd 4 0.090 -3983.4 -2233.2 -2250.4 -2250.4
(0.29) (21.3) (49.0) (48.8) (48.8)
LargeGrace \(\times\) rd 4 0.087 2886.7 6145.4 6359.5 6359.5
(0.28) (31.8) (15.8) (14.5) (14.5)
Cattle \(\times\) rd 4 0.093 791.6 2075.6 2256.1 2256.1
(0.29) (78.1) (54.9) (51.2) (51.2)
Flood in round 1 0.396 1142.1 1142.1
(0.49) (60.8) (60.8)
Head literate0 0.142 746.4 746.4
(0.35) (79.6) (79.6)
NetValue0 2746.425 0.3 0.3 0.3
(3434.12) (32.7) (38.7) (38.7)
Household size0 4.382 1887.2 1887.2
(1.37) (0.9) (0.9)
T = 2 27 10 10 10
T = 3 97 60 60 60
T = 4 354 222 222 222
R2 0.031 0.034 0.045 0.045
Mean of dependent variable 21496 21496 21496 21496
N 809 1283 796 796 796

Cattle holding, experienced vs. inexperienced

Number of cattle holding at baseline by experience

0 1 2 3 4 5 Sum
Adi 108 0 0 0 0 0 108
None 484 0 0 0 0 0 484
Owner 0 99 30 5 3 1 138
Sum 592 99 30 5 3 1 730
Click here to see the code of cattle size impacts by experience.
source(paste0(pathprogram, "ReadTrimLivestockByExperienceANCOVA.R"))
remove(list = ls(pattern = "^incl.?\\d"))
lvoEN = copy(lvoE) # all periods
lvo3EN = copy(lvo3E) # period 4 only
lvoEN[, grepout("TotalImp.*Value$|Self|edV.*0", colnames(lvoEN)) := NULL]
lvo3EN[, grepout("TotalImp.*Value$|Self|edV.*0", colnames(lvo3EN))  := NULL]
#### consistency between cattle ownership/leaseship 
#### at baseline and livestock holding information
lvoEN[, Cattle := "None"]
lvoEN[OwnCattle == 1L, Cattle := "Own"]
lvoEN[AdiCattle == 1L, Cattle := "Adi"]
addmargins(table0(lvoEN[tee == 2, .(Cattle, NumCows0)]))
      NumCows0
Cattle   0   1   2   3   4   5 Sum
  Adi  108   0   0   0   0   0 108
  None 484   0   0   0   0   0 484
  Own    0  99  30   5   3   1 138
  Sum  592  99  30   5   3   1 730
FileName <- "NumCowsExperience"
FileNameHeader <- c("", "PovertyStatus", "Attributes",
  "TimeVarying", "TimeVaryingAttributes",
  "TimeVaryingPovertyStatus", "TimeVaryingPovertyStatusAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta", "TP", "TPa")
listheader <- paste0("nae", regsuffixes)
source(paste0(pathprogram, "NumCowsExperienceCovariateSelectionANCOVA2.R"))
jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
DataToUse1 <- DataToUse2 <- rep("lvoEN", 7)
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
Regressands <- rep("NumCows", jay)
tableboxwidth <- 4.5
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
dig.depmean <- 0
AddMeanStdColumn <- UseRawDataForDestat <- T
source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
Click here to see the code of cattle size impacts by experience subgroups.
FileName0 <- "NumCowsByExperience"
Regressands <- rep("NumCows", 7)
DataToUse1 <- rep("lvoEN", 7)
DataToUse2 <- rep("lvoE3N", 7)
FileNameHeader <- c("", "PovertyStatus", "Attributes",
    "TimeVarying", "TimeVaryingAttributes")
regsuffixes <- c("", "P", "a", "T", "Ta")
listheader <- paste0("cowE", regsuffixes)
exclheader <- paste0("excl", regsuffixes)
inclheader <- gsub("ex", "in", exclheader)
dig.depmean <- 2
if (any(grepl("NumCowsOwnedAtRd1", colnames(lvoEN)))) 
  setnames(lvoEN, "NumCowsOwnedAtRd1", "NumCows0")
#### numcows subsample by experience: own, adi, none
lvoENo <- lvoEN[OwnCattle == 1L, ]
lvoENa <- lvoEN[AdiCattle == 1L, ]
lvoENn <- lvoEN[!(OwnCattle == 1L | AdiCattle == 1L), ]
lvo3ENo <- lvo3EN[OwnCattle == 1L, ]
lvo3ENa <- lvo3EN[AdiCattle == 1L, ]
lvo3ENn <- lvo3EN[!(OwnCattle == 1L | AdiCattle == 1L), ]
Addseparatingcols <- NULL; Separatingcolwidth <- NULL
Separatingcoltitle <- NULL
tableboxwidth <- 4.5
dig.depmean <- 0
for (mm in c("a", "o", "n"))
{
  CreateHTMLTable <- T
  listheader <- paste0("cowE", mm, regsuffixes)
  FileName <- paste0(FileName0, mm)
  if (mm == "o") 
    source(paste0(pathprogram, 
      "NumCowsByExperienceForOwnCovariateSelectionANCOVA2.R")) else
    source(paste0(pathprogram, 
      "NumCowsByExperienceForAdiNoneCovariateSelectionANCOVA2.R"))
  jay <- max(as.numeric(gsub("incl", "", ls(pattern = "^incl\\d"))))
  DataToUse1 <- rep(paste0("lvoEN", mm), jay)
  DataToUse2 <- rep(paste0("lvo3EN", mm), jay)
  exclheader <- paste0("excl", regsuffixes)
  inclheader <- gsub("ex", "in", exclheader)
  AddMeanStdColumn <- UseRawDataForDestat <- T
  source(paste0(pathprogram, "ANCOVAEstimationFile3.R"))
}
centerBox <- 1.1
for (k in 1:length(listheader)) {
  etba <- get(paste0("etba", k)) # adi subsample
  etbo <- get(paste0("etbo", k)) # own subsample
  etbn <- get(paste0("etbn", k)) # no adi nor own subsample
  # fill in empty rows to conform with own subsample
  etba <- rbind(etba[1:grep("p.*HeadL", names(etba[, 1])), ], "", "", 
    etba[-(1:grep("p.*HeadL", names(etba[, 1]))), ])
  etbn <- rbind(etbn[1:grep("p.*HeadL", names(etbn[, 1])), ], "", "", 
    etbn[-(1:grep("p.*HeadL", names(etbn[, 1]))), ])
  etb1 <- cbind(
    etbo[, 1], # covariate names
    etba[, 2], etbo[, 2], etbn[, 2], 
    etba[, 3], etbo[, 3], etbn[, 3]
    )
  etb2 <- cbind(
    etbo[, 1], 
    etba[, 4], etbo[, 4], etbn[, 4], 
    etba[, 5], etbo[, 5], etbn[, 5] 
    )
  ltb1 <- latextab(etb1, 
    hleft = "\\scriptsize\\hfil$", 
    hcenter = c(3.25, rep(centerBox, ncol(etb1)-1)), hright = "$", 
    headercolor = "gray80", adjustlineskip = "-.6ex", delimiterline= NULL,
    alternatecolor2 = "gray90", 
    addseparatingcols = 3, 
    separatingcolwidth = .05, 
    separatingcoltitle = c("mean/std", "(1)"), 
    addsubcoltitlehere = T)
  ltb2 <-  latextab(etb2, 
    hleft = "\\scriptsize\\hfil$", 
    hcenter = c(3.25, rep(centerBox, ncol(etb2)-1)), hright = "$", 
    headercolor = "gray80", adjustlineskip = "-.6ex", delimiterline= NULL,
    alternatecolor2 = "gray90", 
    addseparatingcols = c(3), 
    separatingcolwidth = rep(.05, 1),
    separatingcoltitle = c("(2)", "(3)"), 
    addsubcoltitlehere = T)
  ltb1 <- c(
    ltb1[1:3, ],
    paste(
      "\\rowcolor{gray80}&", 
      paste(
        c(paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}")
        , "",
        paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}"))
        , collapse = "&")
      , "\\\\[-.0ex]", collapse = ""),
    ltb1[-(1:4), ]
    )
  ltb2 <- c(
    ltb2[1:3, ],
    paste(
      "\\rowcolor{gray80}&", 
        paste(c(paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}")
        , "&"), collapse = "&")
      ,
        paste(c(paste("\\makebox[", centerBox, "cm]{\\scriptsize\\sf\\hfil", 
          c("Adi", "Own", "None"), "}")
          ), collapse = "&")
      , 
      "\\\\[-.6ex]", collapse = ""),
    ltb2[-(1:4), ]
    )
  write.tablev(ltb1, 
    paste0(pathsaveHere, FileName0, 1, 
      FileNameHeader[k], "ANCOVAEstimationResults.tex")
    , colnamestrue = F)
  write.tablev(ltb2, 
    paste0(pathsaveHere, FileName0, 2, 
      FileNameHeader[k], "ANCOVAEstimationResults.tex")
    , colnamestrue = F)
}
Click here to see the table of owned cattle impacts by owner group. Number of owned cattle: Owners

NumCowsByExperienceo, TimeVarying

covariates mean/std 1 2 3
(Intercept) 1.50 1.20 1.35
(0.0) (0.0) (2.2)
Large 0.342 0.92 0.89 0.89
(0.48) (0.9) (0.9) (9.1)
LargeGrace 0.268 0.37 0.36 0.20
(0.44) (3.8) (6.1) (50.0)
Cattle 0.200 0.13 0.14 0.10
(0.40) (40.1) (40.9) (68.2)
rd 3 0.346 0.04 0.04 -0.00
(0.48) (73.8) (72.2) (96.9)
Large \(\times\) rd 3 0.115 0.10 0.11 0.20
(0.32) (75.9) (73.9) (57.5)
LargeGrace \(\times\) rd 3 0.092 0.07 0.11 0.06
(0.29) (83.8) (75.6) (88.2)
Cattle \(\times\) rd 3 0.071 0.29 0.30 0.24
(0.26) (30.4) (28.4) (37.3)
rd 4 0.319 0.14 0.14 0.09
(0.47) (29.1) (29.1) (48.6)
Large \(\times\) rd 4 0.112 0.19 0.18 0.15
(0.32) (63.0) (64.6) (71.1)
LargeGrace \(\times\) rd 4 0.088 -0.08 -0.07 -0.18
(0.28) (83.4) (84.0) (61.3)
Cattle \(\times\) rd 4 0.061 0.38 0.41 0.20
(0.24) (20.0) (16.8) (48.5)
Flood in round 1 0.447 0.06
(0.50) (83.1)
Head literate0 0.166 -0.18
(0.37) (53.7)
Number of cattle0 1.420 0.23 -0.74
(0.71) (10.6) (8.2)
NetValue0 30907.220 0.00
(15484.74) (1.2)
Household size0 4.563 0.01
(1.42) (94.8)
T = 2 13 13 6
T = 3 16 16 12
T = 4 104 104 79
R2 0.058 0.070 0.060
Mean of dependent variable 2 2 2
N 295 357 357 267
Click here to see the table of owned cattle impacts by Adi group. Number of owned cattle: Adi

NumCowsByExperiencea, TimeVarying

covariates mean/std 1 2 3
(Intercept) 1.60 1.60 0.98
(0.0) (0.0) (1.9)
Large 0.333 -0.02 -0.02 -0.03
(0.47) (91.5) (91.5) (91.7)
LargeGrace 0.127 0.22 0.22 0.59
(0.33) (45.2) (45.2) (16.6)
Cattle 0.321 -0.12 -0.12 -0.05
(0.47) (56.3) (56.3) (87.2)
rd 3 0.352 -0.09 -0.09 -0.16
(0.48) (37.2) (37.2) (32.4)
Large \(\times\) rd 3 0.115 -0.23 -0.23 -0.54
(0.32) (56.4) (56.4) (29.2)
LargeGrace \(\times\) rd 3 0.048 -0.15 -0.15 0.12
(0.22) (62.1) (62.1) (75.0)
Cattle \(\times\) rd 3 0.109 0.04 0.04 -0.16
(0.31) (91.4) (91.4) (68.7)
rd 4 0.315 0.27 0.27 0.38
(0.47) (10.6) (10.6) (23.0)
Large \(\times\) rd 4 0.115 -0.00 -0.00 -0.21
(0.32) (99.8) (99.8) (69.5)
LargeGrace \(\times\) rd 4 0.036 0.30 0.30 1.37
(0.19) (58.7) (58.7) (21.6)
Cattle \(\times\) rd 4 0.103 0.10 0.10 -0.06
(0.30) (79.1) (79.1) (87.6)
Flood in round 1 0.533 -0.35
(0.50) (15.2)
Head literate0 0.133 0.39
(0.34) (22.1)
NetValue0 959.667 0.00
(8196.80) (1.8)
Household size0 4.655 0.16
(1.17) (5.3)
T = 2 13 13 8
T = 3 24 24 12
T = 4 64 64 35
R2 0.007 0.007 0.094
Mean of dependent variable 2 2 2
N 165 253 253 137
Click here to see the table of owned cattle impacts by other group. Number of owned cattle: Others

NumCowsByExperiencen, TimeVarying

covariates mean/std 1 2 3
(Intercept) 1.41 1.41 1.29
(0.0) (0.0) (0.0)
Large 0.268 0.25 0.25 0.07
(0.44) (3.1) (3.1) (68.4)
LargeGrace 0.254 -0.13 -0.13 -0.09
(0.44) (28.3) (28.3) (56.8)
Cattle 0.278 -0.08 -0.08 -0.17
(0.45) (38.6) (38.6) (25.6)
rd 3 0.349 0.01 0.01 -0.06
(0.48) (90.1) (90.1) (33.0)
Large \(\times\) rd 3 0.091 -0.01 -0.01 0.20
(0.29) (92.5) (92.5) (28.8)
LargeGrace \(\times\) rd 3 0.088 0.35 0.35 0.33
(0.28) (5.9) (5.9) (7.1)
Cattle \(\times\) rd 3 0.095 0.18 0.18 0.30
(0.29) (17.1) (17.1) (7.4)
rd 4 0.327 0.17 0.17 0.10
(0.47) (0.6) (0.6) (11.3)
Large \(\times\) rd 4 0.091 0.05 0.05 0.16
(0.29) (75.3) (75.3) (37.2)
LargeGrace \(\times\) rd 4 0.083 0.61 0.61 0.58
(0.28) (0.2) (0.2) (0.3)
Cattle \(\times\) rd 4 0.091 0.42 0.42 0.47
(0.29) (0.2) (0.2) (0.7)
Flood in round 1 0.393 0.20
(0.49) (4.5)
Head literate0 0.129 0.00
(0.34) (97.7)
NetValue0 2795.554 -0.00
(3689.93) (89.4)
Household size0 4.346 0.04
(1.38) (23.8)
T = 2 61 61 31
T = 3 128 128 83
T = 4 227 227 134
R2 0.050 0.050 0.035
Mean of dependent variable 1 1 1
N 791 998 998 599

Inference

As a general idea, we test the following:

If the regression type is time-varying, we test:

We use car and multcomp packages for hypothesis testing with a user-provided covariance matrix.

Click here to see the a summary table of tested impacts and its code.
contab <- fread("../program/ConfiTableContents.prn")
contab <- do.call(cbind, lapply(contab, function(x) gsub("\\*", "\\\\*", x)))
library(kableExtra)
kt <- kable(contab, format = "html")
kt <- column_spec(kt, 1, extra_css = "vertical-align:top;")
kt <- column_spec(kt, 2, width = "5cm; min-width:5cm;", 
  extra_css = "vertical-align:top;")
kt <- column_spec(kt, 3, width = "8cm; min-width:8cm;", 
  extra_css = "vertical-align:top;")
kt <- column_spec(kt, 4, extra_css = "vertical-align:top;")
kt <- kable_classic(kt, html_font = "Cambria")
#### Below will put the table in the centre of a page. Not visually good.
#### full_width and position arguments are ignored in tufte for some reasons.
#### kt <- kable_paper(kt)
#### kt <- kable_styling(kt, fixed_thead = T, full_width = F, position = "left")
A list of tested hypotheses for impacts
Object What it does Typical terms Code
hvT0 Overall (period 2) level for trad [[1]]Intercept covadd.trad[[1]]
hvN0 Overall (period 2) level for nontrad arm [[1]]Intercept + dummyInKind covadd.nontrad[[1]]
hvN1 Arm - trad in period 2 [[1]][2] dummyInKind covadd.nontrad[[1]][2]
hvTinT Difference = 0 (of trad in time X relative to trad in time 2) [[2]]Time.4 covadd.trad[[i]]
hv trad in each period intercept + Time.T hv = hvT0 + hvTinT
hvNinT Difference = 0 (of arm g in time X relative to arm g at period 2). =hvN0 if period 2. [[2]]Time.4, dummyInKind.Time4 covadd.nontrad[[i]][c(1, 2)]
dhvNinT Difference = 0 (of Arm g and trad in time X) [[2]][1] dummyInKind.Time4 covadd.nontrad[[i]][2]
hvNinT2 difference = 0 (of arm g in time X relative to trad in time 2) [[2]] Arm + TimeX + Arm.TimeX hvN1+covadd.nontrad[[i]][c(1, 2)]
periNrelativeT Cumulative difference = 0 (of arm g and trad in time X) dummyInKind dummyInKind.TimeX for cumulative effects relative to trad in time X periNrelativeT=hvN1+dhvNinT
hvN2 Level of nontrad in time X = cumulative trad + relative to concurrent trad = 0 Intercept+TimeX+Arm+TimeX.Arm hvT0 + hvNinT
dhvJ0 Average difference = 0 (of experienced j and trad) dummyAdiCattle0 j
dhvJinT Difference = 0 (of experienced j and trad in period X) dummyAdiCattle0.TimeX paste0(^, j,.Time.$)
hvJinT Cumulative difference = 0 (of experience j and trad in period X) dummyAdiCattle0 + dummyAdiCattle0.TimeX dhvJ0+dhvJinT
hvJG0 Average difference = 0 (of experience*arm j*g and arm g) dummyAdiCattle0.Large paste0(^, j,$)
dhvJGinT Difference = 0 (of experience*arm j*g and arm g in period X) dummyAdiCattle0.Large.TimeX paste0(^, j, .’,covadd.nontrad[[i]][2])
hvJGinT Cumulative difference = 0 (of experience*arm j*g and arm g in period X) dummyAdiCattle0.Large+ dummyAdiCattle0.Large.TimeX hvJG0 + dhvJGinT
periJGinT Cumulative difference = 0 (of experience*arm j*g and trad in time X) dummyLarge + dummyLarge.TimeX+ dummyAdiCattle0 + dummyAdiCattle0.TimeX+ dummyAdiCattle0.Large+ dummyAdiCattle0.Large.TimeX periNrelativeT+hvJinT+hvJGinT
Click here to see the a summary table of tested schooling impacts and its code.
contab <- fread("../program/ConfiTableContents2.prn")
contab <- do.call(cbind, lapply(contab, function(x) gsub("\\*", "\\\\*", x)))
library(kableExtra)
kt <- kable(contab, format = "html")
kt <- column_spec(kt, 1, extra_css = "vertical-align:top;")
kt <- column_spec(kt, 2, width = "5cm; min-width:5cm;", 
  extra_css = "vertical-align:top;")
kt <- column_spec(kt, 3, width = "8cm; min-width:8cm;", 
  extra_css = "vertical-align:top;")
kt <- column_spec(kt, 4, extra_css = "vertical-align:top;")
kt <- kable_classic(kt, html_font = "Cambria")
A list of tested hypotheses for schooling impacts
Object What it does Typical terms Code
hvMofTA average change = 0 (of males in trad school i) Intercept + School = dMofT addcovaMofT[c(1, i)]
hvFofTA average change = 0 (of females in trad school i) Intercept + School + Female + School.Female = hvMofTA + dFofT hvMofTA + addcovaFofT[c(1, i)]
hvMofNA average change = 0 (of nontrad arm g at school i) intercept + Arm + School + Arm.School = hvMofTA + dMofNA hvMofTA + addcovaMofN[c(1, i)]
hvFofNA average change = 0 (of nontrad Arm g at School i for females) Intercept + Arm + School + Female + Arm.School + Arm.Female + School.Female + Arm.School.Female = Intercept + Arm + School + Arm.School (hvMofNA) + Female + School.Female (dFofT) + Arm.Female + Arm.School.Female (dFofNA) = hvMofNA + dFofT + dFofNA& hvMofNA + dFofT + addcovaFofN[c(1, i)]
hvMofN average difference = 0 (of nontrad Arm g relative to trad, at School i) hvMofNA - hvMofTA = Arm + Arm.School dMofNA
hvFofN difference = 0 (of nontrad Arm g females to trad females, at School i) hvFofNA - hvFofTA = Arm + School + Female + Arm.School + Arm.Female + School.Female + Arm.School.Female - (School + Female + School.Female) = Arm + Arm.School + Arm.Female + Arm.School.Female = hvMofNA + dFofNA hvMofNA + dFofNA
hvMofTinT difference = 0 (of trad in timeX relative to period 2, at School i) School + TimeX + School.TimeX - School = TimeX + School.TimeX addteeMofTinT[c(1 ,i)]
hvFofTinT difference = 0 (of female trad in timeX relative to period 2, at School i) School + TimeX + Female + School.TimeX + School.Female + Female.TimeX + School.Female.TimeX - (School + Female + School.Female)= TimeX + School.TimeX + Female.TimeX + School.Female.TimeX = hvMofTinT + FofTinT hvMofTinT + addteeFofTinT[c(1 ,i)]
hvMofTinTL cumulative change = 0 (of trad at school i in period X) Intercept + School + TimeX + School.TimeX = hvMofTA + hvMofTinT
hvFofTinTL cumulative change = 0 (of female trad at school i in period X) Intercept + School + Female + TimeX + School.TimeX + School.Female + Female.TimeX + School.Female.TimeX = hvFofTA + hvFofTinT
dMofNinT diff = 0 (of nontrad change relative to concurrent trad change, at school iin period X) TimeX + Arm.TimeX + School.TimeX + Arm.School.TimeX - (TimeX + School.TimeX) = Arm.TimeX + Arm.School.TimeX addteeMofNinT[c(1 ,i)]
dFofNinT diff = 0 (of female nontrad change relative to concurrent female trad change, at school i in period X) TimeX + Arm.TimeX + Female.TimeX + School.TimeX + Arm.School.TimeX + Arm.Female.TimeX + Female.School.TimeX + Arm.School.Female.TimeX - (TimeX + Female.TimeX + School.TimeX + Female.School.TimeX) = Arm.TimeX + Arm.School.TimeX + Arm.Female.TimeX + Arm.School.Female.TimeX = dMofNinT + Arm.Female.TimeX + Arm.School.Female.TimeX = dMofNinT + dFofNinT0 addteeFofNinT[c(1 ,i)]
hvMofNinT difference = 0 (of nontrad relative to concurrent trad, at school iin period X) Arm + School + TimeX + Arm.School + Arm.TimeX + School.TimeX + Arm.School.TimeX - (School + TimeX + School.TimeX)= Arm + Arm.School + Arm.TimeX + Arm.School.TimeX = hvMofN + dMofNinT hvMofN + dMofNinT
hvFofNinT difference = 0 (of female nontrad relative to concurrent female trad, at school iin period X) Arm + School + Female + TimeX + Arm.School + Arm.Female + Arm.TimeX + School.Female + School.TimeX + Female.TimeX + Arm.School.Female + Arm.School.TimeX + Arm.Female.TimeX + School.Female.TimeX + Arm.School.Female.TimeX - (School + Female + TimeX + School.Female + School.TimeX + Female.TimeX) = Arm + Arm.School (MofN) + Arm.Female + Arm.School.Female (dFofN) + Arm.TimeX + Arm.School.TimeX (dMofNinT)+ Arm.Female.TimeX + Arm.School.Female.TimeX (dFofNinT0) = hvMofN + dFofN + dMofNinT + dFofNinT0 = hvMofN + dFofN + dFofNinT hvMofN + dFofNA + dFofNinT
hvMofNinTL cumulative change = 0 (of nontrad school i in period X) (intercept) + Arm + School + TimeX + Arm.School + Arm.TimeX + School.TimeX + Arm.School.TimeX = hvMofTinTL + hvMofNinT
(intercept) + School + TimeX + School.TimeX (hvMofTinTL) + Arm + Arm.School (hvMofN)+ Arm.TimeX + Arm.School.TimeX (dMofNinT)
(intercept) + Arm + School + Arm.School (MofNA) + TimeX + School.TimeX (MofTinT) + Arm.TimeX + Arm.School.TimeX (dMofNinT)
hvFofNinTL cumulative change = 0 (of female nontrad school i in period X) (intercept) + Arm + School + Female + TimeX + Arm.School + Arm.Female + Arm.TimeX + School.Female + School.TimeX + Female.TimeX + Arm.School.Female + Arm.School.TimeX + Arm.Female.TimeX + School.Female.TimeX + Arm.School.Female.TimeX + Female + School.Female (dFofT) + Female.TimeX + School.Female.TimeX (dFofTinT) + Arm.Female + Arm.School.Female (dFofNA) + Arm.Female.TimeX + Arm.School.Female.TimeX (dFofNinT) = hvMofNinTL + dFofT + dFofTinT + dFofNA + dFofNinT
Click here to see the code for parameter setting.
lattributeList <- list(
  c("Large", "LargeGrace", "Cattle"),
  c("LargeSize", "WithGrace", "InKind")
  )
#### these are used for letting XX=Large, Cow, etc.
covadd0 <- list(c("\\(Intercept\\)", "dummyXX"), 
  c("Time.3", "dummyXX.Time3"),
  c("Time.4", "dummyXX.Time4"))
covaddsav <- list(c("\\(Intercept\\)", "dummyXX"), 
  c("LY2", "dummyXX.LY2"), # LY is loan year
  c("LY3", "dummyXX.LY3"),
  c("LY4", "dummyXX.LY4"))
covaddsch <- list(
  # male, traditional (MofT)
  MofT=c("\\(Intercept\\)", "^dummyJunior$", "^dummyHigh$"), 
  # female, traditional (FofT)
  FofT=c("^Female$", "^dummyJunior.Female$", "^dummyHigh.Female$"),
  # male, other arms (MofN)
  MofN=c("^dummyXX$", "^dummyXX.dummyJunior$", "^dummyXX.dummyHigh$"), 
  # female, other arms (FofN)
  FofN=c("^dummyXX.Female$", "^dummyXX.dummyJunior.Female$", 
    "^dummyXX.dummyHigh.Female$"),
  # male, trad, time (MofTinT)
  MofTinT=c("^Time.YY$", "^dummyJunior.TimeYY$", "^dummyHigh.TimeYY$"), 
  # female, trad, time (FofTinT)
  FofTinT=c("^Female.TimeYY$", "^dummyJunior.Female.TimeYY$", 
   "^dummyHigh.Female.TimeYY$"), 
  # male, other arms, time (MofNinT)
  MofNinT=c("^dummyXX.TimeYY$", "^dummyXX.dummyJunior.TimeYY$", 
  "^dummyXX.dummyHigh.TimeYY$"), 
  # female, other arms, time (FofNinT)
  FofNinT=c("^dummyXX.Female.TimeYY$", 
    "^dummyXX.dummyJunior.Female.TimeYY$", 
    "^dummyXX.dummyHigh.Female.TimeYY$")
  )
FileNames <- c(
  "Schooling", 
  "Land", "Livestock", "NumCows",
  "AssetLivestock", "NetAssets", "NetBroadAssets",
  "NetAssetsAnnualPrices", "NetNLAssets", 
  "NetAssetsExperience", 
  "NumCowsExperience", 
  paste0("NetAssetsByExperience", c("a", "o", "n")),
  paste0("NumCowsByExperience", c("a", "o", "n")),
  "LabourIncome", 
  "Consumption", "ConsumptionOLS")
ListHeaderList <- c(
  "sc", 
  "ld", "lv", "cw", 
  "al", "na", "nb", 
  "np", "nl", # non livestock assets
  "nE", "lE", # net assets by experience, livestock by experience, OwnCow0, AdiCow0
  "nA", "nO", "nN", 
  "lA", "lO", "lN",
  "lb", 
  "cn", "co")
add5 <- c("b", "P", "a", "T", "Ta")
add7 <- c("b", "P", "a", "T", "Ta", "TP", "TPa")
reglists <- list(
  paste0("sc", add5),
  paste0("ld", add7),
  paste0("lv", add5),
  paste0("cw", add7),
  paste0("al", add5),
  paste0("na", add7),
  paste0("nb", add7),
  paste0("np", add7),
  paste0("nl", add7),
  paste0("nE", add7),
  paste0("lE", add7),
  paste0("nA", add7),
  paste0("nO", add7),
  paste0("nN", add7),
  paste0("lA", add5),
  paste0("lO", add5),
  paste0("lN", add5),
  paste0("lb", add7),
  paste0("cn", add7),
  paste0("co", add7)
  )
names(reglists) <- ListHeaderList
gc()
            used   (Mb) gc trigger   (Mb) limit (Mb)  max used   (Mb)
Ncells   2901642  155.0    5330314  284.7         NA   5330314  284.7
Vcells 226820806 1730.6  471807172 3599.7      56320 471806977 3599.7
FNstrings <- "AssetLivestock"
FNames <- FileNames[!grepl(FNstrings, FileNames)]
ListHeaderListForQS <- ListHeaderList[!grepl(FNstrings, FileNames)]
reglists <- reglists[!grepl(FNstrings, FileNames)]
robj <- lapply(1:length(FNames), function(i) 
  qread(paste0(pathsaveHere, "ANCOVA_", FNames[i],".qs")))

Tests for non-schooling outcomes

Click here to see the code to run hypothesis testing.
confi <- linhyp <- NULL
library(car)
library(multcomp)
#### r:
#### 4 (in ListHeaderList, 5) is number of cattle
#### 5 (in ListHeaderList, 6) is net assets
#### 9 (in ListHeaderList, 11) is net non livestock assets
r <- grep("NetAssets$", FNames)
for (r in 2:length(ListHeaderListForQS)) {
  # r: outcomes
  for (rr in 1:length(robj[[r]])) {
    # rr: regression type: "b", "P", "a", "T", "Ta", "PT", "PTa"
    # regobj: e.g., "asT" with s=2,...,7 regression specifications
    regtype <- gsub("^..", "", reglists[[r]][rr])
    if (grepl("a", regtype)) 
      lattributes <- lattributeList[[2]] else
      lattributes <- lattributeList[[1]]
    regobj <- robj[[r]][[rr]]
    if (grepl("cn", ListHeaderListForQS[r])) regobj <- regobj[1:3] # consumption: 4-6 are HH aggregates
    if (grepl("co", ListHeaderListForQS[r])) regobj <- regobj[1:2] # consumptionOLS: 4-5 are HH aggregates
    lmlist <- lapply(regobj, "[[", "lm")
    coefflist <- lapply(lmlist, "[[", "coefficients")
    c(reglists[[r]][rr]) 
    # drop NAs in coeff
    coefflist <- lapply(coefflist, function(x) x[!is.na(x)])
    Vlist <- lapply(lapply(regobj, "[[",  "robust"), "[[", "V")
    # Define covadd (a string vector used to pick coefficients for testing)
    # if regressand is saving:
    #  Change to loan year: TimeX => LYX
    #  Multiply with 12 (turn to monthly to yearly)
    if (any(grepl("sv", reglists[[r]]))) {
      covadd <- covaddsav 
      Mult <- 12
    } else {
      covadd <- covadd0
      Mult <- 1
    }
    covadd.trad <- lapply(covadd, function(x) x[1])
    for (s in 1:length(regobj)) {
      # s: 7 regression specifications
      thisreg <- lmlist[[s]]
      coeffvec <- coefflist[[s]]
      thisV <- Vlist[[s]]
      # Consumption: No rd1 so period= 1, 2. Drop period 3 variables.
      if (grepl("cn", ListHeaderListForQS[r])) startnum <- 2 else startnum <- 1
      # construct conf int for linear combination of coeffs
      #if (grepl("cn", ListHeaderList[r])) addcova <- covadd[-2]
       ## period 2 (=overall, when no Time is present) effects ##
      # trad
      # hvT0: picks covariates to test overall change
      #  [[1]]"\\(Intercept\\)"
      hvT0 <- rep(0, length(coeffvec))
      hvT0[grepl(
           paste0("^", covadd.trad[[1]], "$")
          , names(coeffvec))] <- 1*Mult
      lhcow <- glht(model=thisreg, linfct = matrix(hvT0, byrow = T, nrow=1), 
        alternative="two.sided", vcov.=thisV)
      confi <- rbind(confi, 
         c(FNames[r], regtype, s, "trad", "None", "level of reference trad", "T0", 
         startnum, confint(lhcow)$confint[1, ], 
         if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
         )
      linhyp <- c(linhyp, list(hvT0, thisreg$coeff))
      names(linhyp)[length(linhyp)] <- 
        paste0(c(FNames[r], regtype, s, "trad", "None", "level of reference trad", startnum), collapse = "")
      # nontrad
      for (g in lattributes) {
        # g: attributes or arm
        # construct coefficient names for attribute g (replace XX with g)
        covadd.nontrad <- lapply(covadd, function(x) gsub("XX", g, x))
        # E.g., if g = Large, 
        #  [[1]]
        #  [1] "\\(Intercept\\)" "dummyLarge"     
        #  [[2]]
        #  [1] "Time.3"           "dummyLarge.Time3"
        #  [[3]]
        #  [1] "Time.4"           "dummyLarge.Time4"
        # hvN0: period 2 level for Arm
        #  [[1]]"\\(Intercept\\)", "dummyInKind"
        hvN0 <- rep(0, length(coeffvec))
        hvN0[grepl(
          paste(
            paste0("^", covadd.nontrad[[1]], "$")
           , collapse = "|")
           , names(coeffvec))] <- 1*Mult
        lhcow <- glht(model=thisreg, linfct = matrix(hvN0, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confi <- rbind(confi, 
          c(FNames[r], regtype, s, g, "None", "level of reference nontrad", "N0", 
           startnum, confint(lhcow)$confint[1, ], 
           if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
          )
        linhyp <- c(linhyp, list(hvN0, thisreg$coeff))
        names(linhyp)[length(linhyp)] <- 
          paste0(c(FNames[r], regtype, s, g, "None", "level of reference nontrad", startnum), collapse = "")
        # hvN1: difference of period 2 Arm relative to period 2 trad
        #  [[1]][2] "dummyInKind"
        cumstrings0 <- peristrings0 <- paste0("^", covadd.nontrad[[1]][2], "$")
        hvN1 <- rep(0, length(coeffvec))
        hvN1[grepl(
            paste0("^", covadd.nontrad[[1]][2], "$")
           , names(coeffvec))] <- 1*Mult
        lhcow <- glht(model=thisreg, linfct = matrix(hvN1, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confi <- rbind(confi, 
          c(FNames[r], regtype, s, g, "None", "reference nontrad - reference trad", "N1", 
           startnum, confint(lhcow)$confint[1, ], 
           if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
         )
        linhyp <- c(linhyp, list(hvN1, thisreg$coeff))
        names(linhyp)[length(linhyp)] <- 
          paste0(c(FNames[r], regtype, s, g, "None", "reference nontrad - reference trad", 
          startnum), collapse = "")
         ## 2 way (Arm*Time) interactions ##
        if (grepl("T", regtype)) {
          # i: period loop. Start from startnum+1 (=2. Only in consumption, =3.)
          #for (i in (startnum+1):length(covadd.trad)) {
          # i: period loop. Start from startnum (=1. Only in consumption, =2.)
          #  1: Time2 or reference period. 2: Time3, 3: Time4
          for (i in startnum:length(covadd.trad)) {
            # i: period index
            # trad
            # hvTinT: difference = 0 (of trad in time X relative to trad in time 2)
            # [[2]] "Time.4"
            hvTinT <- rep(0, length(coeffvec))
            hvTinT[grepl(
                paste0("^", covadd.trad[[i]], "$")
              , names(coeffvec))] <- 1*Mult
            lhcow <- glht(model=thisreg, linfct = matrix(hvTinT, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, "trad", "None", "trad in each period - trad in period 2", 
                "TinT", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
              )
            linhyp <- c(linhyp, list(hvTinT, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, "trad", "None", "trad in each period - trad in period 2", i), collapse = "")
            # hvTL: level = 0 (of trad in TimeX)
            # intercept + Time.X
            hvTL <- hvT0 + hvTinT
            lhcow <- glht(model=thisreg, linfct = matrix(hvTL, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, "trad", "None", "level of trad in period X", 
                "TL", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
            linhyp <- c(linhyp, list(hvTL, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, "trad", "None", "level of trad in period X", i), collapse = "")
            # nontrad
            # hvNinT: difference = 0 (of arm g in time X relative to arm g at period 2)
            #   intercept + Arm +TimeX + Arm.TimeX - (intercept + Arm) 
            #   = TimeX + Arm.TimeX
            # [[2]] "Time.4", "dummyInKind.Time4"
            # For period 2, it gives period 2 level of Arm. 
            hvNinT <- rep(0, length(coeffvec))
            hvNinT[grepl(
              paste(
                paste0("^", covadd.nontrad[[i]], "$")
              , collapse = "|")
              , names(coeffvec))] <- 1*Mult
            lhcow <- glht(model=thisreg, linfct = matrix(hvNinT, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, g, "None", "nontrad in each period - nontrad in period 2", 
               "NinT", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
              )
            linhyp <- c(linhyp, list(hvNinT, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, g, "None", "nontrad in each period - nontrad in period 2", i), collapse = "")
            # dhvNinT: Difference = 0 (of Arm g relative to trad, in time X)
            # Marginal difference between g and trad in time X.
            # [[2]][1] "dummyInKind.Time4"
            dhvNinT <- rep(0, length(coeffvec))
            dhvNinT[grepl(
                paste0("^", covadd.nontrad[[i]][2], "$")
              , names(coeffvec))] <- 1*Mult
            lhcow <- glht(model=thisreg, linfct = matrix(dhvNinT, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, g, "None", "nontrad - trad, in each period", 
                "dNinT", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
              )
            linhyp <- c(linhyp, list(dhvNinT, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, g, "None", "nontrad - trad in each period", i), collapse = "")
            # hvNinT2: difference = 0 (of arm g in time X relative to trad in time 2)
            #   intercept + Arm +TimeX + Arm.TimeX - (intercept) 
            #   = Arm + TimeX + Arm.TimeX 
            #   = hvN1 + hvNinT
            # [[2]] "dummyInKind", "Time.4", "dummyInKind.Time4"
            hvNinT2 <- hvN1 + hvNinT
            lhcow <- glht(model=thisreg, linfct = matrix(hvNinT2, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, g, "None", "nontrad in each period - trad in period 2", 
               "NinT2", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
              )
            linhyp <- c(linhyp, list(hvNinT2, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, g, "None", "nontrad in each period - trad in period 2", i), collapse = "")
            # periNrelativeT: Cumulative difference = 0 (of nontrad Arm g relative to trad, in time i)
            # Total difference between g and trad in time X.
            #  "dummyInKind"+"dummyInKind.TimeX" for cumulative effects relative to trad in time X
            # "dummyInKind" is stored in peristrings0 at hvN1
            periNrelativeT <- rep(0, length(coeffvec))
            peristrings2 <- paste(peristrings0, paste0("^", covadd.nontrad[[i]][2], "$"), sep = "|")
            periNrelativeT[grepl(peristrings2, names(coeffvec))] <- 1*Mult
            lhcow <- glht(model=thisreg, linfct = matrix(periNrelativeT, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, g, "None", "sum of (nontrad - trad, in each period)", 
                "periNrelativeT", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
              )
            linhyp <- c(linhyp, list(periNrelativeT, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, g, "None", 
              "sum of nontrad - trad in each period", i), collapse = "")
            # hvN2: level = 0 (of nontrad in period t)
            # = cumulative trad + relative to concurrent trad
            # Intercept+TimeX+Arm+TimeX.Arm=hvT0 + hvNinT
            hvN2 <- hvT0 + hvNinT
            lhcow <- glht(model=thisreg, linfct = matrix(hvN2, byrow = T, nrow=1), 
              alternative="two.sided", vcov.=thisV)
            confi <- rbind(confi, 
              c(FNames[r], regtype, s, g, "None", "level of nontrad in each period", 
              "N2", 
                i, confint(lhcow)$confint[1, ], 
                if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
              )
            linhyp <- c(linhyp, list(hvN2, thisreg$coeff))
            names(linhyp)[length(linhyp)] <- 
              paste0(c(FNames[r], regtype, s, g, "None", "level of nontrad in each period", i), collapse = "")
            ## 3 way (OwnCattle0*Arm*Time) interactions ##
            # Loop over OwnCattle0, AdiCattle0, 
            if (grepl("sExpe", FNames[r])) {
              for (j in paste0("dummy", c("Own", "Adi"), "Cattle0")) {
              # j: experience type
                # dhvJ0: Difference between j and trad at period 2
                #  dummyAdiCattle0
                # dhvJG0: Difference between j and arm/attribute g at period 2
                #  dummyAdiCattle0.Large
                # dhvJinT: Difference between j and concurrent trad in period X.
                #  dummyAdiCattle0.TimeX
                # dhvJGinT: Difference between j*g and g in X
                #  dummyAdiCattle0.Large.TimeX
                # hvJinT: Cumulative difference between j and concurrent trad in period X.
                #  dummyAdiCattle0 + dummyAdiCattle0.TimeX
                # hvJGinT: Cumulative difference between j*g and g in T
                #  dummyAdiCattle0.Large + dummyAdiCattle0.Large.TimeX
                # periJGinT: Cumulative difference between j*g and concurrent trad in time X.
                #  dummyLarge + dummyLarge.TimeX : periNrelativeT
                # +dummyAdiCattle0 + dummyAdiCattle0.TimeX : hvJinT
                # +dummyAdiCows0.Large+dummyAdiCows0.Large.TimeX : hvJGinT

                # dhvJ0: dummyAdiCattle0
                # Difference between j and trad at period 2
                 dhvJ0 <- rep(0, length(coeffvec))
                 dhvJ0[grepl(
                     paste0("^", j, "$")
                   , names(coeffvec))] <- 1*Mult
                 lhcow <- glht(model=thisreg, linfct = matrix(dhvJ0, byrow = T, nrow=1), 
                   alternative="two.sided", vcov.=thisV)
                 confi <- rbind(confi, 
                   c(FNames[r], regtype, s, g, j, "j*g - trad, in period 2", 
                     "dJ0", 
                     i, confint(lhcow)$confint[1, ], 
                     if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
                   )
                 linhyp <- c(linhyp, list(dhvJ0, thisreg$coeff))
                 names(linhyp)[length(linhyp)] <- 
                   paste0(c(FNames[r], regtype, s, g, j, "jg - trad in period 2", i), collapse = "")
                # dhvJinT: dummyAdiCattle0.TimeX
                # dhvJinT: Difference between j and concurrent trad in period X.
                 dhvJinT <- rep(0, length(coeffvec))
                 dhvJinT[grepl(
                     paste0("^", j, ".Time.$")
                   , names(coeffvec))] <- 1*Mult
                 lhcow <- glht(model=thisreg, linfct = matrix(dhvJinT, byrow = T, nrow=1), 
                   alternative="two.sided", vcov.=thisV)
                 confi <- rbind(confi, 
                   c(FNames[r], regtype, s, g, j, "j - trad, in each period", 
                     "dJinT", 
                     i, confint(lhcow)$confint[1, ], 
                     if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
                   )
                 linhyp <- c(linhyp, list(dhvJinT, thisreg$coeff))
                 names(linhyp)[length(linhyp)] <- 
                   paste0(c(FNames[r], regtype, s, g, j, "j - trad in each period", i), collapse = "")
                # hvJinT: Total difference between j and concurrent trad in period T.
                #  dummyAdiCattle0 + dummyAdiCattle0.TimeX
                 hvJinT <- dhvJ0+dhvJinT
                # hvJG0: dummyAdiCattle0.Large
                 hvJG0 <- rep(0, length(coeffvec))
                 hvJG0[grepl(
                     paste0("^", j, "$")
                   , names(coeffvec))] <- 1*Mult
                # dhvJGinT: dummyAdiCattle0.Large.TimeX
                 dhvJGinT <- rep(0, length(coeffvec))
                 dhvJGinT[grepl(
                     paste0("^", j, ".", covadd.nontrad[[i]][2])
                   , names(coeffvec))] <- 1*Mult
                # hvJGinT: dummyAdiCattle0.Large + dummyAdiCattle0.Large.TimeX
                 hvJGinT <- hvJG0 + dhvJGinT
                 lhcow <- glht(model=thisreg, linfct = matrix(hvJGinT, byrow = T, nrow=1), 
                   alternative="two.sided", vcov.=thisV)
                 confi <- rbind(confi, 
                   c(FNames[r], regtype, s, g, j, "j*g - g, in each period", 
                     "JGinT", 
                     i, confint(lhcow)$confint[1, ], 
                     if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
                   )
                 linhyp <- c(linhyp, list(hvJGinT, thisreg$coeff))
                 names(linhyp)[length(linhyp)] <- 
                   paste0(c(FNames[r], regtype, s, g, j,
                     "RelativeToConcurrentArmAttribute", i), collapse = "")
                # periJGinT: Cumulative difference between j*g and concurrent trad in time X.
                #  dummyLarge + dummyLarge.TimeX : periNrelativeT
                # +dummyAdiCattle0 + dummyAdiCattle0.TimeX : hvJinT
                # +dummyAdiCows0.Large+dummyAdiCows0.Large.TimeX : hvJGinT
                periJGinT <- periNrelativeT+hvJinT+hvJGinT
                lhcow <- glht(model=thisreg, linfct = matrix(periJGinT, byrow = T, nrow=1), 
                  alternative="two.sided", vcov.=thisV)
                confi <- rbind(confi, 
                  c(FNames[r], regtype, s, g, j, "j*g - trad, in each period", 
                    "periJGinT", 
                     i, confint(lhcow)$confint[1, ], 
                     if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
                  )
                linhyp <- c(linhyp, list(periNrelativeT, thisreg$coeff))
                names(linhyp)[length(linhyp)] <- 
                  paste0(c(FNames[r], regtype, s, g, j, "jg - trad in each period", i), collapse = "")
              } # end: cattle experience (Own/Adi) j loop
            } # end: if "sExperience in FileName[r]" loop
            ### Some outcomes do not have dummyUltraPoor as a level covariate. Need to fix it.
            ### Before doing so, abort these outcomes.
            if (grepl("Exper", FNames[r])) next
            if (grepl("Pa?$", reglists[[r]][rr])) {
              # if time-invariant poverty wise impacts are estimated
              # matP
              # Poor = 0 for trad
              # Poor + Arm.Poor = 0 for nontrad
              # covadd.trad
              # [[1]][1] "\\(Intercept\\)" ==> dummyUltraPoor
              # [[2]][1] "Time.3" ==> dummyUltraPoor.Time3
              # [[3]][1] "Time.4" ==> dummyUltraPoor.Time4
              # trad
              covadd.tradP <- lapply(covadd.trad, 
                function(x) gsub(".*ntercept.*", "dummyUltraPoor", x))
              covadd.tradP <- lapply(covadd.tradP, 
                function(x) gsub("T", "dummyUltraPoor.T", x))
              covadd.tradP <- lapply(covadd.tradP, 
                function(x) gsub("Time\\.", "Time", x))
              matPT <- rep(0, length(coeffvec))
              matPT[grepl(
                paste0("^", covadd.tradP[[1]], "$")
              , names(coeffvec))] <- 1*Mult
              # dummyInKind.Time4 ==> dummyInKind.UltraPoor.Time4
              covadd.nontradP <- lapply(covadd.nontrad, 
                function(x) gsub("T", "UltraPoor.T", x[2]))
              # nontrad 
              matPN <- rep(0, length(coeffvec))
              matPN[grepl(
                  paste0("^", covadd.nontradP[[i]], "$")
                , names(coeffvec))] <- 1*Mult
              matP <- rbind(matPT, matPN=matPT+matPN)
              lhcow <- glht(model=thisreg, linfct = matP, 
                alternative="two.sided", vcov.=thisV)
              confi <- rbind(confi, 
                c(FNames[r], regtype, s, g, "poor", "Poor + Arm.Poor = 0, time invariant", 
                  "matP", 
                   "2-4", confint(lhcow)$confint[1, ], 
                   if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA),
                c(FNames[r], regtype, s, g, "poor + arm*poor", "Poor + Arm.Poor = 0, time invariant", 
                  "matP", 
                   "2-4", confint(lhcow)$confint[2, ], 
                   if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[2] else NA)
               )
            } # end: if time-invariant poverty wise impacts are estimated
            if (grepl("TPa?$", reglists[[r]][rr])) {
              # if time-variant poverty wise impacts are estimated
              # dmatPTinT
              # Time = 2: Poor = 0; Time = 3: Poor.Time3 = 0  for trad
              # dmatPNinT
              # Time = 2: Arm.Poor = 0; Time = 3: Arm.Poor.Time3 = 0 for nontrad
              # TimeYY ==> dummyUltraPoor.TimeYY
              covadd.tradP <- lapply(covadd.trad, 
                function(x) gsub(".*ntercept.*", "dummyUltraPoor", x))
              covadd.tradP <- lapply(covadd.tradP, 
                function(x) gsub("T", "dummyUltraPoor.T", x))
              covadd.tradP <- lapply(covadd.tradP, 
                function(x) gsub("Time\\.", "Time", x))
              dmatPTinT <- rep(0, length(coeffvec))
              dmatPTinT[grepl(
                paste0("^", covadd.tradP[[i]], "$")
              , names(coeffvec))] <- 1*Mult
              # dummyInKind.Time4 ==> dummyInKind.UltraPoor.Time4
              covadd.nontradP <- lapply(covadd.nontrad, 
                function(x) gsub("T", "UltraPoor.T", x[2]))
              # nontrad 
              dmatPNinT <- rep(0, length(coeffvec))
              dmatPNinT[grepl(
                  paste0("^", covadd.nontradP[[i]], "$")
                , names(coeffvec))] <- 1*Mult
              # matPTinT: sum of (poor trad - nonpoor trad, in each period)
              # Time = 2: Poor = 0; Time = 3: Poor + Poor.Time3 = 0  for trad
              #   = matP + dmatPTinT
              # matPNinT: sum of (poor nontrad - nonpoor nontrad, in each period)
              # Time = 2: Poor + Arm.Poor = 0; Time = 3: Poor + Arm.Poor + Arm.Poor.Time3 = 0 for nontrad
              #   = matPTinT + dmatPNinT
              # Poor = 0 for trad
              matP <- rep(0, length(coeffvec))
              matP[grep("^dummyUltraPoor$", names(coeffvec))] <- 1*Mult
              matPTinT <- matP + dmatPTinT
              matPNinT <- matPTinT + dmatPNinT
              lhcow1 <- glht(model=thisreg, linfct = t(matrix(dmatPTinT)),
                alternative="two.sided", vcov.=thisV)
              lhcow2 <- glht(model=thisreg, linfct = t(matrix(dmatPNinT)),
                alternative="two.sided", vcov.=thisV)
              lhcow3 <- glht(model=thisreg, linfct = t(matrix(matPTinT)),
                alternative="two.sided", vcov.=thisV)
              lhcow4 <- glht(model=thisreg, linfct = t(matrix(matPNinT)),
                alternative="two.sided", vcov.=thisV)
              confi <- rbind(confi, 
                c(FNames[r], regtype, s, g, "dpoor.TimeX", 
                  "poor trad - nonpoor trad, in each period", "dmatPTinT", 
                   i, confint(lhcow1)$confint[1, ], 
                   if (sum(lhcow1$linfct) != 0) summary(lhcow1)$test$pvalues[1] else NA),
                c(FNames[r], regtype, s, g, "dpoor.Arm.TimeX", 
                  "poor nontrad - nonpoor nontrad, in each period", "dmatPNinT", 
                   i, confint(lhcow2)$confint[1, ], 
                   if (sum(lhcow2$linfct) != 0) summary(lhcow2)$test$pvalues[1] else NA),
                c(FNames[r], regtype, s, g, "poor.TimeX", 
                  "sum of (poor trad - nonpoor trad, in each period)", "matPTinT", 
                   i, confint(lhcow3)$confint[1, ], 
                   if (sum(lhcow3$linfct) != 0) summary(lhcow3)$test$pvalues[1] else NA),
                c(FNames[r], regtype, s, g, "poor.Arm.TimeX", 
                  "sum of (poor nontrad - nonpoor nontrad, in each period)", "matPNinT", 
                   i, confint(lhcow4)$confint[1, ], 
                   if (sum(lhcow4$linfct) != 0) summary(lhcow4)$test$pvalues[1] else NA)
               )
            } # end: if time-variant poverty wise impacts are estimated
          } # end: period i loop
        } # end: if "T in regtype" loop
      } # end: attribute g loop
    } # end: reg specification s loop 2:7
  } # end: reg type rr loop ("", "P", "a", "T", "Ta", ...)
} # end: outcome r loop
confi <- data.table(unique(confi))
setnames(confi, c("FileName", "regtype", "num", "attributes", "experience",
  "ImpactType", "hv", "period", "estimate", "lb", "ub", "pvalue"))
numcols <- c("period", "estimate", "lb", "ub", "num", "pvalue")
confi[, (numcols) := lapply(.SD, as.numeric), .SDcols = numcols]
faccols <- c("FileName", "regtype", "attributes", "experience", "hv", "ImpactType")
confi[, (faccols) := lapply(.SD, as.factor), .SDcols = faccols]
#### Drop all num == 1 except for ConsumptionOLS, 
#### NumCows and NumCowsAdi, NumCowsNone, NumCowsOwn, 
confi <- confi[grepl("NumCows|OLS", FileName) | (!grepl("NumCows", FileName) & num != 1), ]
confi <- confi[!(grepl("NumCowsE", FileName) & num == 1), ]
table(confi[, .(FileName, num)])
                        num
FileName                   1   2   3   4   5   6
  Consumption              0 257 257   0   0   0
  ConsumptionOLS         361 361   0   0   0   0
  LabourIncome             0 361 361 361 361 361
  Land                     0 361 361 361 361 361
  Livestock                0 137 137 137   0   0
  NetAssets                0 361 361 361 361 361
  NetAssetsAnnualPrices    0 361 361 361 361 361
  NetAssetsByExperiencea   0 253 253 253   0   0
  NetAssetsByExperiencen   0 253 253 253   0   0
  NetAssetsByExperienceo   0 253 253 253   0   0
  NetAssetsExperience      0 541 541 541 541   0
  NetBroadAssets           0 355 355 355 355 355
  NetNLAssets              0 361 361 361 361 361
  NumCows                361 361 361 361   0   0
  NumCowsByExperiencea   137 137 137   0   0   0
  NumCowsByExperiencen   137 137 137   0   0   0
  NumCowsByExperienceo   137 137 137   0   0   0
  NumCowsExperience        0 541 541 541 541   0
confi[, ImpactType := factor(ImpactType, 
  levels = c(
    "level of reference trad",
    "level of trad in period X",
    "level of reference nontrad",
    "level of nontrad in each period",
    "reference nontrad - reference trad",
    "trad in each period - trad in period 2",
    "nontrad in each period - trad in period 2",
    "nontrad in each period - nontrad in period 2",
    "nontrad - trad, in each period",
    "sum of (nontrad - trad, in each period)",
    "j - trad, in each period",
    "j*g - trad, in period 2",
    "j*g - trad, in each period",
    "j*g - g, in each period",
    "Poor + Arm.Poor = 0, time invariant",
    "poor trad - nonpoor trad, in each period",
    "poor nontrad - nonpoor nontrad, in each period",
    "sum of (poor trad - nonpoor trad, in each period)",
    "sum of (poor nontrad - nonpoor nontrad, in each period)"
  ))]
confi[, ImpactType := factor(ImpactType, 
  labels = c(
    "level of reference trad",
    "level of trad in each period",
    "level of reference nontrad",
    "level of nontrad in each period",
    "reference nontrad - reference trad",
    "trad in each period - trad in period 2",
    "nontrad in each period - trad in period 2",
    "nontrad in each period - nontrad in period 2",
    "nontrad - trad, in each period",
    "sum of (nontrad - trad, in each period)",
    "j - trad, in each period",
    "j*g - trad in period 2",
    "j*g - trad, in each period",
    "j*g - g, in each period",
    "poor - nonpoor, in all arms, time invariant",
    "poor trad - nonpoor trad, in each period",
    "poor nontrad - nonpoor nontrad, in each period",
    "sum of (poor trad - nonpoor trad, in each period)",
    "sum of (poor nontrad - nonpoor nontrad, in each period)"
))]


confi[grepl("Con.*OL", FileName) & regtype=="T" & grepl("ge$", attributes) & grepl("sum", ImpactType), ]
         FileName regtype   num attributes experience                              ImpactType
           <fctr>  <fctr> <num>     <fctr>     <fctr>                                  <fctr>
1: ConsumptionOLS       T     1      Large       None sum of (nontrad - trad, in each period)
2: ConsumptionOLS       T     1      Large       None sum of (nontrad - trad, in each period)
3: ConsumptionOLS       T     1      Large       None sum of (nontrad - trad, in each period)
4: ConsumptionOLS       T     2      Large       None sum of (nontrad - trad, in each period)
5: ConsumptionOLS       T     2      Large       None sum of (nontrad - trad, in each period)
6: ConsumptionOLS       T     2      Large       None sum of (nontrad - trad, in each period)
               hv period  estimate         lb       ub    pvalue
           <fctr>  <num>     <num>      <num>    <num>     <num>
1: periNrelativeT      1 -24.82061 -154.22274 104.5815 0.7068970
2: periNrelativeT      2 106.74113 -165.72779 379.2101 0.4424986
3: periNrelativeT      3  99.48224  -94.92933 293.8938 0.3158087
4: periNrelativeT      1  30.03860  -93.35580 153.4330 0.6331967
5: periNrelativeT      2 152.92079 -116.60017 422.4417 0.2660418
6: periNrelativeT      3 134.16950  -46.78632 315.1253 0.1461213
confi[, period := period + 1]
#### period is NA for non-timevarying regressions
confi[!grepl("T", regtype), period := NA]
confi[!is.na(period) & grepl("Con", FileName) & num == 2 & grepl("Ta", regtype), ][
order(attributes, ImpactType, period)]
          FileName regtype   num attributes experience                                   ImpactType
            <fctr>  <fctr> <num>     <fctr>     <fctr>                                       <fctr>
 1: ConsumptionOLS      Ta     2     InKind       None                   level of reference nontrad
 2:    Consumption      Ta     2     InKind       None                   level of reference nontrad
 3: ConsumptionOLS      Ta     2     InKind       None              level of nontrad in each period
 4:    Consumption      Ta     2     InKind       None              level of nontrad in each period
 5: ConsumptionOLS      Ta     2     InKind       None              level of nontrad in each period
 6:    Consumption      Ta     2     InKind       None              level of nontrad in each period
 7: ConsumptionOLS      Ta     2     InKind       None              level of nontrad in each period
 8: ConsumptionOLS      Ta     2     InKind       None           reference nontrad - reference trad
 9:    Consumption      Ta     2     InKind       None           reference nontrad - reference trad
10: ConsumptionOLS      Ta     2     InKind       None    nontrad in each period - trad in period 2
11:    Consumption      Ta     2     InKind       None    nontrad in each period - trad in period 2
12: ConsumptionOLS      Ta     2     InKind       None    nontrad in each period - trad in period 2
13:    Consumption      Ta     2     InKind       None    nontrad in each period - trad in period 2
14: ConsumptionOLS      Ta     2     InKind       None    nontrad in each period - trad in period 2
15: ConsumptionOLS      Ta     2     InKind       None nontrad in each period - nontrad in period 2
16:    Consumption      Ta     2     InKind       None nontrad in each period - nontrad in period 2
17: ConsumptionOLS      Ta     2     InKind       None nontrad in each period - nontrad in period 2
18:    Consumption      Ta     2     InKind       None nontrad in each period - nontrad in period 2
19: ConsumptionOLS      Ta     2     InKind       None nontrad in each period - nontrad in period 2
20: ConsumptionOLS      Ta     2     InKind       None               nontrad - trad, in each period
21:    Consumption      Ta     2     InKind       None               nontrad - trad, in each period
22: ConsumptionOLS      Ta     2     InKind       None               nontrad - trad, in each period
23:    Consumption      Ta     2     InKind       None               nontrad - trad, in each period
24: ConsumptionOLS      Ta     2     InKind       None               nontrad - trad, in each period
25: ConsumptionOLS      Ta     2     InKind       None      sum of (nontrad - trad, in each period)
26:    Consumption      Ta     2     InKind       None      sum of (nontrad - trad, in each period)
27: ConsumptionOLS      Ta     2     InKind       None      sum of (nontrad - trad, in each period)
28:    Consumption      Ta     2     InKind       None      sum of (nontrad - trad, in each period)
29: ConsumptionOLS      Ta     2     InKind       None      sum of (nontrad - trad, in each period)
30: ConsumptionOLS      Ta     2  LargeSize       None                   level of reference nontrad
31:    Consumption      Ta     2  LargeSize       None                   level of reference nontrad
32: ConsumptionOLS      Ta     2  LargeSize       None              level of nontrad in each period
33:    Consumption      Ta     2  LargeSize       None              level of nontrad in each period
34: ConsumptionOLS      Ta     2  LargeSize       None              level of nontrad in each period
35:    Consumption      Ta     2  LargeSize       None              level of nontrad in each period
36: ConsumptionOLS      Ta     2  LargeSize       None              level of nontrad in each period
37: ConsumptionOLS      Ta     2  LargeSize       None           reference nontrad - reference trad
38:    Consumption      Ta     2  LargeSize       None           reference nontrad - reference trad
39: ConsumptionOLS      Ta     2  LargeSize       None    nontrad in each period - trad in period 2
40:    Consumption      Ta     2  LargeSize       None    nontrad in each period - trad in period 2
41: ConsumptionOLS      Ta     2  LargeSize       None    nontrad in each period - trad in period 2
42:    Consumption      Ta     2  LargeSize       None    nontrad in each period - trad in period 2
43: ConsumptionOLS      Ta     2  LargeSize       None    nontrad in each period - trad in period 2
44: ConsumptionOLS      Ta     2  LargeSize       None nontrad in each period - nontrad in period 2
45:    Consumption      Ta     2  LargeSize       None nontrad in each period - nontrad in period 2
46: ConsumptionOLS      Ta     2  LargeSize       None nontrad in each period - nontrad in period 2
47:    Consumption      Ta     2  LargeSize       None nontrad in each period - nontrad in period 2
48: ConsumptionOLS      Ta     2  LargeSize       None nontrad in each period - nontrad in period 2
49: ConsumptionOLS      Ta     2  LargeSize       None               nontrad - trad, in each period
50:    Consumption      Ta     2  LargeSize       None               nontrad - trad, in each period
51: ConsumptionOLS      Ta     2  LargeSize       None               nontrad - trad, in each period
52:    Consumption      Ta     2  LargeSize       None               nontrad - trad, in each period
53: ConsumptionOLS      Ta     2  LargeSize       None               nontrad - trad, in each period
54: ConsumptionOLS      Ta     2  LargeSize       None      sum of (nontrad - trad, in each period)
55:    Consumption      Ta     2  LargeSize       None      sum of (nontrad - trad, in each period)
56: ConsumptionOLS      Ta     2  LargeSize       None      sum of (nontrad - trad, in each period)
57:    Consumption      Ta     2  LargeSize       None      sum of (nontrad - trad, in each period)
58: ConsumptionOLS      Ta     2  LargeSize       None      sum of (nontrad - trad, in each period)
59: ConsumptionOLS      Ta     2       trad       None                      level of reference trad
60:    Consumption      Ta     2       trad       None                      level of reference trad
61: ConsumptionOLS      Ta     2       trad       None                 level of trad in each period
62:    Consumption      Ta     2       trad       None                 level of trad in each period
63: ConsumptionOLS      Ta     2       trad       None                 level of trad in each period
64:    Consumption      Ta     2       trad       None                 level of trad in each period
65: ConsumptionOLS      Ta     2       trad       None                 level of trad in each period
66: ConsumptionOLS      Ta     2       trad       None       trad in each period - trad in period 2
67:    Consumption      Ta     2       trad       None       trad in each period - trad in period 2
68: ConsumptionOLS      Ta     2       trad       None       trad in each period - trad in period 2
69:    Consumption      Ta     2       trad       None       trad in each period - trad in period 2
70: ConsumptionOLS      Ta     2       trad       None       trad in each period - trad in period 2
71: ConsumptionOLS      Ta     2  WithGrace       None                   level of reference nontrad
72:    Consumption      Ta     2  WithGrace       None                   level of reference nontrad
73: ConsumptionOLS      Ta     2  WithGrace       None              level of nontrad in each period
74:    Consumption      Ta     2  WithGrace       None              level of nontrad in each period
75: ConsumptionOLS      Ta     2  WithGrace       None              level of nontrad in each period
76:    Consumption      Ta     2  WithGrace       None              level of nontrad in each period
77: ConsumptionOLS      Ta     2  WithGrace       None              level of nontrad in each period
78: ConsumptionOLS      Ta     2  WithGrace       None           reference nontrad - reference trad
79:    Consumption      Ta     2  WithGrace       None           reference nontrad - reference trad
80: ConsumptionOLS      Ta     2  WithGrace       None    nontrad in each period - trad in period 2
81:    Consumption      Ta     2  WithGrace       None    nontrad in each period - trad in period 2
82: ConsumptionOLS      Ta     2  WithGrace       None    nontrad in each period - trad in period 2
83:    Consumption      Ta     2  WithGrace       None    nontrad in each period - trad in period 2
84: ConsumptionOLS      Ta     2  WithGrace       None    nontrad in each period - trad in period 2
85: ConsumptionOLS      Ta     2  WithGrace       None nontrad in each period - nontrad in period 2
86:    Consumption      Ta     2  WithGrace       None nontrad in each period - nontrad in period 2
87: ConsumptionOLS      Ta     2  WithGrace       None nontrad in each period - nontrad in period 2
88:    Consumption      Ta     2  WithGrace       None nontrad in each period - nontrad in period 2
89: ConsumptionOLS      Ta     2  WithGrace       None nontrad in each period - nontrad in period 2
90: ConsumptionOLS      Ta     2  WithGrace       None               nontrad - trad, in each period
91:    Consumption      Ta     2  WithGrace       None               nontrad - trad, in each period
92: ConsumptionOLS      Ta     2  WithGrace       None               nontrad - trad, in each period
93:    Consumption      Ta     2  WithGrace       None               nontrad - trad, in each period
94: ConsumptionOLS      Ta     2  WithGrace       None               nontrad - trad, in each period
95: ConsumptionOLS      Ta     2  WithGrace       None      sum of (nontrad - trad, in each period)
96:    Consumption      Ta     2  WithGrace       None      sum of (nontrad - trad, in each period)
97: ConsumptionOLS      Ta     2  WithGrace       None      sum of (nontrad - trad, in each period)
98:    Consumption      Ta     2  WithGrace       None      sum of (nontrad - trad, in each period)
99: ConsumptionOLS      Ta     2  WithGrace       None      sum of (nontrad - trad, in each period)
          FileName regtype   num attributes experience                                   ImpactType
                hv period    estimate          lb          ub       pvalue
            <fctr>  <num>       <num>       <num>       <num>        <num>
 1:             N0      2 3152.550510 2931.123285 3373.977735 0.000000e+00
 2:             N0      3 2125.832613 1844.526334 2407.138892 0.000000e+00
 3:             N2      2 6331.890349 5964.051665 6699.729033 0.000000e+00
 4:             N2      3 2032.457507 1802.789242 2262.125772 0.000000e+00
 5:             N2      3 3956.030846 3713.845566 4198.216126 0.000000e+00
 6:             N2      4 1942.826339 1636.562773 2249.089905 0.000000e+00
 7:             N2      4 3849.251194 3653.493787 4045.008601 0.000000e+00
 8:             N1      2  -26.789329 -152.180206   98.601549 6.753368e-01
 9:             N1      3   93.375106  -47.910650  234.660861 1.950306e-01
10:          NinT2      2 3125.761181 2804.791234 3446.731128 0.000000e+00
11:          NinT2      3   93.375106  -47.910650  234.660861 1.950306e-01
12:          NinT2      3  749.901678  507.840020  991.963336 1.365170e-09
13:          NinT2      4    3.743938 -182.970277  190.458153 9.686289e-01
14:          NinT2      4  643.122026  496.637022  789.607031 0.000000e+00
15:           NinT      2 3152.550510 2931.123285 3373.977735 0.000000e+00
16:           NinT      3    0.000000    0.000000    0.000000           NA
17:           NinT      3  776.691007  573.381168  980.000846 8.437695e-14
18:           NinT      4  -89.631168 -340.816822  161.554485 4.840494e-01
19:           NinT      4  669.911355  506.369083  833.453626 1.332268e-15
20:          dNinT      2  -26.789329 -152.180206   98.601549 6.753368e-01
21:          dNinT      3    0.000000    0.000000    0.000000           NA
22:          dNinT      3  224.385736   33.391577  415.379896 2.131170e-02
23:          dNinT      4 -181.553845 -438.709134   75.601444 1.662863e-01
24:          dNinT      4   10.874220 -152.101620  173.850060 8.959291e-01
25: periNrelativeT      2  -26.789329 -152.180206   98.601549 6.753368e-01
26: periNrelativeT      3   93.375106  -47.910650  234.660861 1.950306e-01
27: periNrelativeT      3  197.596407  -37.902477  433.095292 1.000456e-01
28: periNrelativeT      4  -88.178740 -275.042934   98.685455 3.547669e-01
29: periNrelativeT      4  -15.915108 -149.052642  117.222425 8.147156e-01
30:             N0      2 3209.378439 3034.882693 3383.874185 0.000000e+00
31:             N0      3 2093.602427 1855.303966 2331.900888 0.000000e+00
32:             N2      2 6388.718278 6074.649031 6702.787524 0.000000e+00
33:             N2      3 2032.457507 1802.789242 2262.125772 0.000000e+00
34:             N2      3 3854.527297 3577.881050 4131.173543 0.000000e+00
35:             N2      4 2148.462843 1827.598267 2469.327419 0.000000e+00
36:             N2      4 3942.507871 3683.509198 4201.506543 0.000000e+00
37:             N1      2   30.038600  -93.355796  153.432996 6.331967e-01
38:             N1      3   61.144920  -79.712926  202.002766 3.946129e-01
39:          NinT2      2 3239.417039 2984.729357 3494.104721 0.000000e+00
40:          NinT2      3   61.144920  -79.712926  202.002766 3.946129e-01
41:          NinT2      3  705.226058  412.768320  997.683796 2.349174e-06
42:          NinT2      4  177.150256  -20.077172  374.377684 7.829214e-02
43:          NinT2      4  793.206632  594.011722  992.401542 7.438494e-15
44:           NinT      2 3209.378439 3034.882693 3383.874185 0.000000e+00
45:           NinT      3    0.000000    0.000000    0.000000           NA
46:           NinT      3  675.187458  435.696008  914.678908 3.457845e-08
47:           NinT      4  116.005336 -115.217017  347.227689 3.251959e-01
48:           NinT      4  763.168032  564.946414  961.389649 5.417888e-14
49:          dNinT      2   30.038600  -93.355796  153.432996 6.331967e-01
50:          dNinT      3    0.000000    0.000000    0.000000           NA
51:          dNinT      3  122.882187  -89.346660  335.111034 2.563692e-01
52:          dNinT      4   24.082659 -186.094889  234.260206 8.221876e-01
53:          dNinT      4  104.130897  -70.492359  278.754154 2.424277e-01
54: periNrelativeT      2   30.038600  -93.355796  153.432996 6.331967e-01
55: periNrelativeT      3   61.144920  -79.712926  202.002766 3.946129e-01
56: periNrelativeT      3  152.920787 -116.600175  422.441749 2.660418e-01
57: periNrelativeT      4   85.227578  -90.642826  261.097983 3.419525e-01
58: periNrelativeT      4  134.169498  -46.786322  315.125317 1.461213e-01
59:             T0      2 3179.339839 3016.600572 3342.079106 0.000000e+00
60:             T0      3 2032.457507 1802.789242 2262.125772 0.000000e+00
61:             TL      2 6358.679677 6033.201144 6684.158211 0.000000e+00
62:             TL      3 2032.457507 1802.789242 2262.125772 0.000000e+00
63:             TL      3 3731.645110 3561.366843 3901.923376 0.000000e+00
64:             TL      4 2124.380184 1876.340966 2372.419402 0.000000e+00
65:             TL      4 3838.376973 3682.256825 3994.497122 0.000000e+00
66:           TinT      2 3179.339839 3016.600572 3342.079106 0.000000e+00
67:           TinT      3    0.000000    0.000000    0.000000           NA
68:           TinT      3  552.305271  479.669938  624.940604 0.000000e+00
69:           TinT      4   91.922677    7.669529  176.175825 3.250903e-02
70:           TinT      4  659.037134  598.244247  719.830022 0.000000e+00
71:             N0      2 3170.470992 2976.423791 3364.518193 0.000000e+00
72:             N0      3 1970.983364 1693.068225 2248.898503 0.000000e+00
73:             N2      2 6349.810830 6018.120131 6681.501530 0.000000e+00
74:             N2      3 2032.457507 1802.789242 2262.125772 0.000000e+00
75:             N2      3 3527.029881 3259.650878 3794.408884 0.000000e+00
76:             N2      4 2160.254254 1769.653042 2550.855466 0.000000e+00
77:             N2      4 3700.635601 3449.410848 3951.860353 0.000000e+00
78:             N1      2   -8.868847 -143.991200  126.253506 8.976155e-01
79:             N1      3  -61.474142 -215.444275   92.495990 4.336303e-01
80:          NinT2      2 3161.602145 2869.470900 3453.733390 0.000000e+00
81:          NinT2      3  -61.474142 -215.444275   92.495990 4.336303e-01
82:          NinT2      3  338.821195   67.003537  610.638854 1.457478e-02
83:          NinT2      4   66.322605 -166.087675  298.732884 5.757040e-01
84:          NinT2      4  512.426915  356.441697  668.412133 1.329843e-10
85:           NinT      2 3170.470992 2976.423791 3364.518193 0.000000e+00
86:           NinT      3    0.000000    0.000000    0.000000           NA
87:           NinT      3  347.690042  135.341364  560.038721 1.337217e-03
88:           NinT      4  127.796747 -158.880000  414.473495 3.820012e-01
89:           NinT      4  521.295762  329.219320  713.372203 1.088471e-07
90:          dNinT      2   -8.868847 -143.991200  126.253506 8.976155e-01
91:          dNinT      3    0.000000    0.000000    0.000000           NA
92:          dNinT      3 -204.615229 -416.215887    6.985429 5.805394e-02
93:          dNinT      4   35.874070 -217.705970  289.454110 7.814219e-01
94:          dNinT      4 -137.741373 -324.083010   48.600265 1.473551e-01
95: periNrelativeT      2   -8.868847 -143.991200  126.253506 8.976155e-01
96: periNrelativeT      3  -61.474142 -215.444275   92.495990 4.336303e-01
97: periNrelativeT      3 -213.484076 -485.402533   58.434382 1.238251e-01
98: periNrelativeT      4  -25.600072 -224.774069  173.573924 8.009719e-01
99: periNrelativeT      4 -146.610220 -302.775402    9.554963 6.575419e-02
                hv period    estimate          lb          ub       pvalue
####confi <- rbindlist(list(confi, confis), use.names = T, fill = T)
setcolorder(confi, c("FileName", "regtype", "num", "attributes", 
  "hv", "ImpactType", "period", "lb", "estimate", "ub"))
confi <- confi[!(grepl("Con", FileName) & estimate == 0), ]
confi[, attributes := factor(attributes, 
  levels = c("trad", "Large", "LargeGrace", "Cattle",
  "LargeSize", "WithGrace", "InKind"))]
confi[, attributes := factor(attributes, 
  labels = c("Traditional", "Large", "LargeGrace", "Cattle",
  "Upfront", "WithGrace", "InKind"))]
confi[, experience := factor(experience, 
  levels = c("None", "dummyAdiCattle0", "dummyOwnCattle0"))]
confi[, experience := factor(experience, 
  labels = c("None", "AdiCattle", "OwnCattle"))]
#### NumCows reg specs
#### 1. NA,
#### 2. "|NumCows0$",
#### 3. "|Head|Flood|HH",
#### 4. "|^dummyHadCows"
#### 5. "|TotalImp.*0$"
#### NumCowsByExperience reg specs
#### Own subsample (1=OLS, 2=ANCOVA, 3=ANCOVA with covariates, 4=ditto)
#### 1. NA,
#### 2. "|NumCows0$",
#### 3. "|Head|Flood|HH|^NetVa.*0$",
#### 4. "|NumC.*0$"
#### Adi, None subsamples (1=OLS, 3=OLS with covariates)
#### 1. NA, 
#### 2. "", # "|NumC.*0$" is NA if own=none, adi. Lead to error in linear hyp testing. Set to NA.
#### 3. "|Head|Flood|HH|^NetVa.*0$",
#### 4. ""
#### Comparable: 
####  NumCows 1 = 1 in all others
####  NumCows 2 = 2 in Own, 
####  NumCows 3 = 3 in Own, 3 in Adi, None (OLS, though)
confi[, AtType := "Arms (relative to Traditional)"]
confi[grepl("With|Kin", attributes), AtType := "Functional attributes (relative to Upfront, Upfront+WithGrace)"]
confi[grepl("^NinT$|TinT", hv), AtType := "Arms (relative to own in period 2)"]
confi[grepl("N2$|T0|N0", hv), AtType := "Levels"]
confi[, AtType := factor(AtType)]
confi[, regressand := "livestock"]
confi[grepl("Sch", FileName), regressand := "enrollment"]
confi[grepl("Cows$", FileName), regressand := "cattle"]
confi[grepl("CowsEx", FileName), regressand := "cattle, Experience"]
confi[grepl("CowsBy.*a$", FileName), regressand := "cattle, Adi"]
confi[grepl("CowsBy.*o$", FileName), regressand := "cattle, Own"]
confi[grepl("CowsBy.*n$", FileName), regressand := "cattle, None"]
confi[grepl("^NetAssets", FileName), regressand := "net assets"]
confi[grepl("^NetBroad.*ts$", FileName), regressand := "net broad assets"]
confi[grepl("^Net.*ea$", FileName), regressand := "net assets, Adi"]
confi[grepl("^Net.*eo$", FileName), regressand := "net assets, Own"]
confi[grepl("^Net.*en$", FileName), regressand := "net assets, None"]
confi[grepl("Net.*Pri", FileName), regressand := "net assets, AP"]
confi[grepl("tsEx", FileName), regressand := gsub("$", ", Experience", regressand)]
####confi[grepl("^AssetL", FileName), regressand := "broad total assets"]
confi[grepl("^NetNL", FileName), regressand := "net non-livestock assets"]
confi[grepl("Lan", FileName), regressand := "land"]
confi[grepl("Lab", FileName), regressand := "labour incomes"]
confi[grepl("Consumption$", FileName), regressand := "consumption"]
confi[grepl("ConsumptionO", FileName), regressand := "consumption, OLS"]
confi[, FileName := gsub("^Asset", "BroadAsset", FileName)]
confi[, FileName := gsub("ByExperiencea", "Adi", FileName)]
confi[, FileName := gsub("ByExperienceo", "Own", FileName)]
confi[, FileName := gsub("ByExperiencen", "None", FileName)]
confi[, regressand := factor(regressand)]
confi[, FileName := factor(FileName)]
####confi[grepl("far", FileName), regressand := "farm incomes"]
#### confi[grepl("sv", FileName), regressand := "net saving"]
#### confi[grepl("sv.[45]", FileName), regressand := "repayment"]
#### confi[grepl("sv.[78]", FileName), regressand := "effective repayment"]
#### confi[grepl("sc", FileName), regressand := "schooling"]
confi[, attributes := factor(attributes, levels = 
  c("Traditional", "Large", "LargeGrace", "Cattle", "Upfront", "WithGrace", "InKind"))]
confi[, regressand := factor(regressand, levels = 
  c("land", "livestock", #"broad total assets", 
    "net non-livestock assets", 
    paste0(rep(c("net assets", "cattle"), each = 5), 
      rep(c("", ", Adi", ", None", ", Own", ", Experience"), 2))
    , "net broad assets", "net assets, AP", 
    "enrollment", "consumption", "consumption, OLS", "labour incomes")
      )]
saveRDS(confi, paste0(pathsaveHere, "EstimatesCI.rds"))
qsave(confi, paste0(pathsaveHere, "EstimatesCI.qs"))
saveRDS(linhyp, paste0(pathsaveHere, "LinearHypothesis.rds"))

Tests for schooling outcomes

Click here to see the code to run hypothesis testing for schooling.
library(car)
library(multcomp)
#### schooling
screglists <-  paste0("sc", 2:3)
schlevels <- c("primary", "junior", "high")
covadd <- covaddsch 
confis <- NULL
rr <- 4; s <- 2
r <- 1; g <- "Large"
for (rr in 1:length(reglists[[r]])) {
  # rr: regression type: "sc", "sca", "scP", "scT", "scTa", ....
  # regobj: e.g., "scT" with 7 regression specifications: 
  # specification s (from SchoolingCovariateSelectionANCOVA2.R):
  # 1. NA,
  # 2.  "|Enrolled0$",
    # add {dummyJunior/dummyHigh} and
    # {Arms}*{dummyJunior/dummyHigh} or
    # {Arms}*{dummyJunior/dummyHigh}*{Time.x}
  # 3.  "|^dummy[JH].*[rh]$|^dummy[CI].*[ed]\\.dummy[JH].*[rh]$|^dummy[LW].*[cgz]e\\.dummy[JH].*[rh]$|^dummy[JH].*[rh]\\.T|^dummy[CI].*[ed]\\.dummy[JH].*[rh]\\.T|^dummy[LW].*[cgz]e\\.dummy[JH].*[rh]\\.T",
  # 4.  "|ChildAge|Eldest|Head.*0|HHsize0|Flood",
    # add {Arms}*{dummyJunior/dummyHigh}*{Female}
    # {Arms}*{dummyJunior/dummyHigh}*{Female}*{Time.x}
  # 5. "|Female",
   #6. "|ChildAge|Eldest|Head.*0|HHsize0|Flood"
  regtype <- gsub("^..", "", reglists[[r]][rr])
  if (grepl("a", regtype)) 
    lattributes <- lattributeList[[2]] else
    lattributes <- lattributeList[[1]]
  regobj <- robj[[r]][[rr]]
  lmlist <- lapply(regobj, "[[", "lm")
  coefflist <- lapply(lmlist, "[[", "coefficients")
  # check NAs in coeff
  lapply(1:length(coefflist), function(i) c(i, names(coefflist[[i]])[is.na(coefflist[[i]])]))
  coefflist <- lapply(coefflist, function(x) x[!is.na(x)])
  Vlist <- lapply(lapply(regobj, "[[",  "robust"), "[[", "V")
  Mult <- 1
  covadd.trad <- lapply(covaddsch, function(x) x[1])
  # s-th specification
  for (s in 2:length(regobj)) {
    thisreg <- regobj[[s]]$lm
    coeffvec <- thisreg$coeff
    thisV <- regobj[[s]]$robust$V
    thisres <- regobj[[s]]$robust$est
    for (g in lattributes) {
      # lattributes: 
      #  Arms (Large, LargeGrace, Cattle) or 
      #  functional attributes (Upfront, Grace, InKind)
      addcova <- lapply(covaddsch, function(x) gsub("XX", g, x))
      # covaddsch[1]: $MofT: \\(Intercept\\), ^dummyJunior$, ^dummyHigh$
      # covaddsch[2]: $FofT: ^Female$, ^dummyJunior.Female$, ^dummyHigh.Female$
      # covaddsch[4]: $FofN: ^dummyXX.Female$, ^dummyXX.dummyJunior.Female$,
      #   ^dummyXX.dummyHigh.Female$
      # covaddsch[7]: $MofNinT: ^dummyXX.TimeYY$, ^dummyXX.dummyJunior.TimeYY$,
      #   ^dummyXX.dummyHigh.TimeYY$
      # So, for example, g = Large gives
      # addcova[4]: $FofN: ^dummyLarge.Female$, ^dummyLarge.dummyJunior.Female$,
      #   ^dummyLarge.dummyHigh.Female$
      # addcova[7]: $MofNinT: ^dummyLarge.TimeYY$, ^dummyLarge.dummyJunior.TimeYY$,
      #   ^dummyLarge.dummyHigh.TimeYY$
      # names(addcova): MofT, FofT, MofN, FofN, MofTinT, FofTinT, MofNinT, FofNinT
      #   male of trad, female of trad, male of nontrad, female of nontrad, 
      #   male of trad in T, female of trad in T, male of nontrad in T, female of nontrad in T
      for (gg in names(addcova))
        assign(paste0("addcova", gg), addcova[[gg]])
      # i: school level
      # addcovaMofT: \\(Intercept\\), ^dummyJunior$, ^dummyHigh$
      for (i in 1:length(addcovaMofT)) {
        # hvMofTA: average change = 0 (of males in trad school i)
        #  Intercept + School 
        #  = MofT
        #  [[1]]"\\(Intercept\\)" "^dummyJunior$"   "^dummyHigh$"
        hvMofTA <- rep(0, length(coeffvec))
        # i picks up: 1 = primary, 2 = primary+dJunior, 3 = primary+dHigh
        hvMofTA[grepl(
             paste0(unique(addcovaMofT[c(1, i)]), collapse = "|")
            , names(coeffvec))] <- 1*Mult
        if (any(is.na(coeffvec))) hvMofTA <- hvMofTA[!is.na(coeffvec)]
        lhcow <- glht(model=thisreg, linfct = matrix(hvMofTA, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confis <- rbind(confis, 
           c(FileNames[r], regtype, s, "traditional", "male", schlevels[i], 
             "level of reference trad", "2-4", "MofTA", 
             confint(lhcow)$confint[1, ], 
             if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
           )
        # hvFofTA: average change = 0 (of females in trad school i)
        # addcovaFofT: ^Female$, ^dummyJunior.Female$, ^dummyHigh.Female$
        # Intercept+School+^Female$+Female.School
        # = hvMofTA + dFofT
        # For s < 4: There is no Female term. This copies male coefficient.
        # Just use male estimates and label them as "all".
        # After the loop, 
        #  drop s<4 & grepl("female", gender), rewrite "male" => "all"
        hvFofTA <- dFofT <- rep(0, length(coeffvec))
        dFofT[grepl(
             paste0(addcovaFofT[c(1, i)], collapse = "|")
            , names(coeffvec))] <- 1*Mult
        hvFofTA <- hvMofTA + dFofT
        lhcow <- glht(model=thisreg, linfct = matrix(hvFofTA, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confis <- rbind(confis, 
           c(FileNames[r], regtype, s, "traditional", "female", schlevels[i], 
             "level of reference female trad", "2-4", "FofTA", 
             confint(lhcow)$confint[1, ], 
             if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
           )
        # nontrad
        # construct coefficient names for attribute g
        covadd.nontrad <- lapply(covadd, function(x) gsub("XX", g, x))
        # gross = trad + delta.Arm
        # hvMofNA: average change = 0 (of nontrad arm g at school i)
        # addcovaMofT: \\(Intercept\\), ^dummyJunior$, ^dummyHigh$
        # addcovaMofN: ^dummyLarge$, ^dummyLarge.dummyJunior$, ^dummyLarge.dummyHigh$
        # intercept + School + Arm + Arm.School 
        # = hvMofTA + dMofN
        #  [[1]]"\\(Intercept\\)", "School", "dummyInKind.School"
        dMofNA <- rep(0, length(coeffvec))
        dMofNA[grepl(
             paste0(addcovaMofN[c(1, i)], collapse = "|")
            , names(coeffvec))] <- 1*Mult
        hvMofNA <- hvMofTA + dMofNA
        lhcow <- glht(model=thisreg, linfct = matrix(hvMofNA, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confis <- rbind(confis, 
             c(FileNames[r], regtype, s, g, "male", schlevels[i], 
               "level of nontrad at school", "2-4", "MofNA", 
               confint(lhcow)$confint[1, ], 
               if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
          )
        # hvFofNA: average change = 0 (of female nontrad Arm g at School i)
        #  \\(Intercept\\)+Arm+School+Female+Arm.School+Arm.Female+School.Female+Arm.School.Female
        #  \\(Intercept\\)+Arm+School+Arm.School + Female+School.Female + Arm.Female+Arm.School.Female
        # hvMofNA + dFofT + dFofNA
        dFofNA <- rep(0, length(coeffvec))
        dFofNA[grepl(
             paste0(addcovaFofN[c(1, i)], collapse = "|")
            , names(coeffvec))] <- 1*Mult
        hvFofNA <- hvMofNA + dFofT + dFofNA
        lhcow <- glht(model=thisreg, linfct = matrix(hvFofNA, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confis <- rbind(confis, 
             c(FileNames[r], regtype, s, g, "female", schlevels[i], 
               "level of female nontrad at school", "2-4", "FofNA", 
               confint(lhcow)$confint[1, ], 
               if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
          )
        # hvMofN: average difference = 0 (of nontrad Arm g relative to trad, at School i)
        #  hvMofNA - hvMofTA = Arm + Arm.School
        #  dummyInKind + dummyInKind.School
        hvMofN <- hvMofNA - hvMofTA
        lhcow <- glht(model=thisreg, linfct = matrix(hvMofN, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confis <- rbind(confis, 
             c(FileNames[r], regtype, s, g, "male", schlevels[i], 
               "nontrad - trad, at school", "2-4", "MofN", 
               confint(lhcow)$confint[1, ], 
               if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
          )
        # hvFofN: difference = 0 (of nontrad Arm g females to trad females, at School i)
        #  hvFofNA - hvFofTA = Arm + Arm.School + Arm.Female + Arm.School.Female
        #  = hvMofN + dFofNA
        hvFofN <- hvMofN + dFofNA
        lhcow <- glht(model=thisreg, linfct = matrix(hvFofN, byrow = T, nrow=1), 
          alternative="two.sided", vcov.=thisV)
        confis <- rbind(confis, 
             c(FileNames[r], regtype, s, g, "female", schlevels[i], 
               "female nontrad - female trad, at school", "2-4", "FofN", 
               confint(lhcow)$confint[1, ], 
               if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
          )
        for (tee in 2:4) {
          for (gg in names(addcova)) {
            # for gg (each comparison addcova), substitute period = 3, 4 to YY
            adc <- get(paste0("addcova", gg))
            assign(paste0("addtee", gg), gsub("YY", tee, adc))
            # addcovaMofNinT: ^dummyLarge.TimeYY$, ^dummyLarge.dummyJunior.TimeYY$,
            #   ^dummyLarge.dummyHigh.TimeYY$
            # So, for example, tee = 3 gives
            # addteeMofNinT: ^dummyLarge.Time3$, ^dummyLarge.dummyJunior.Time3$,
            #   ^dummyLarge.dummyHigh.Time3$
            # addcovaFofNinT: ^dummyInKind.Female.TimeYY, 
            #  ^dummyInKind.dummyJunior.Female.TimeYY$, 
            #  ^dummyInKind.dummyHigh.Female.TimeYY$
            # So, for example, tee = 3 gives
            # addteeFofNinT: ^dummyInKind.Female.Time3, 
            #  ^dummyInKind.dummyJunior.Female.Time3$, 
            #  ^dummyInKind.dummyHigh.Female.Time3$
          }
          # hvMofTinT: trad timeX - trad period 2, at school i
          #  School + TimeX + School.TimeX - School
          #  = TimeX + School.TimeX
          #  at tee == 2, (trad timeX - trad period 2, at school i) = 0
          hvMofTinT <- rep(0, length(coeffvec))
          if (tee > 2) 
            hvMofTinT[grepl(
               paste0(addteeMofTinT[c(1 ,i)], collapse = "|")
               , names(coeffvec))] <- 1*Mult
          lhcow <- glht(model=thisreg, linfct = matrix(hvMofTinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, "traditional", "male", schlevels[i], 
                 "trad in each period - trad in period 2, at school", tee, 
                 "MofTinT", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # female
          # hvFofTinT: female trad timeX - female trad period 2, at school i
          #  School + TimeX + Female
          #   + School.TimeX + School.Female + Female.TimeX + School.Female.TimeX 
          #   - (School + Female + School.Female)
          #  = TimeX + School.TimeX  (hvMofTinT)
          #     +Female.TimeX + School.Female.TimeX ... dFofTinT
          #  = hvMofTinT                + dFofTinT
          #  at tee == 2, (female trad timeX - female trad period 2, at school i) = 0
          dFofTinT <- rep(0, length(coeffvec))
          if (tee > 2) 
            dFofTinT[grepl(
              paste0(addteeFofTinT[c(1 ,i)], collapse = "|")
              , names(coeffvec))] <- 1*Mult
          hvFofTinT <- hvMofTinT + dFofTinT
          lhcow <- glht(model=thisreg, linfct = matrix(hvFofTinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, "traditional", "female", schlevels[i], 
                 "female trad in each period - period 2 female trad, at school", tee, 
                 "FofTinT", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # hvMofTinTL: cumulative change = 0 (of trad school i in period X)
          # Intercept+School+TimeX+School.TimeX
          #  = hvMofTA + hvMofTinT
          # if tee == 2
          #   Intercept+School = hvMofTA
          hvMofTinTL <- hvMofTA + hvMofTinT
          if (tee == 2) hvMofTinTL <- hvMofTA
          lhcow <- glht(model=thisreg, linfct = matrix(hvMofTinTL, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, "traditional", "male", schlevels[i], 
                 "level of trad in each period, at school", tee, 
                 "MofTinTL", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          hvFofTinTL <- hvFofTA + hvFofTinT
          if (tee == 2) hvFofTinTL <- hvFofTA
          lhcow <- glht(model=thisreg, linfct = matrix(hvFofTinTL, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, "traditional", "female", schlevels[i], 
                 "level of female trad in each period, at school", tee, 
                 "FofTinTL", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # dMofNinT: diff = 0 (of nontrad change relative to concurrent trad change, at school iin period X)
          #  TimeX + Arm.TimeX + School.TimeX + Arm.School.TimeX 
          #    - (TimeX + School.TimeX)
          #  = Arm.TimeX + Arm.School.TimeX 
          # addteeMofNinT: ^dummyLarge.Time3$, ^dummyLarge.dummyJunior.Time3$,
          #   ^dummyLarge.dummyHigh.Time3$
          dMofNinT <- dFofNinT <- dFofNinT0 <- rep(0, length(coeffvec))
          dMofNinT[grepl(
            paste0(addteeMofNinT[c(1 ,i)], collapse = "|")
            , names(coeffvec))] <- 1*Mult
          # if tee == 2: Arm + Arm.School = hvMofN
          if (tee == 2) dMofNinT <- hvMofN
          lhcow <- glht(model=thisreg, linfct = matrix(dMofNinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, g, "male", schlevels[i], 
                 "nontrad change - trad change, in each period, at school", tee, 
                 "dMofNinT", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # hvMofNinT: diff = 0 (of nontrad relative to concurrent trad, at school iin period X)
          #  Arm + School + TimeX + Arm.School + Arm.TimeX + School.TimeX + Arm.School.TimeX 
          #    - (School + TimeX + School.TimeX)
          #  = Arm + Arm.School + Arm.TimeX + Arm.School.TimeX 
          #  = hvMofTinT + dMofNinT
          # addteeMofNinT: ^dummyLarge.Time3$, ^dummyLarge.dummyJunior.Time3$,
          #   ^dummyLarge.dummyHigh.Time3$
          hvMofNinT <- hvMofTinT + dMofNinT
          # hvMofN (Arm + Arm.School)
          if (tee == 2) hvMofNinT <- hvMofN
          lhcow <- glht(model=thisreg, linfct = matrix(hvMofNinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, g, "male", schlevels[i], 
                 "nontrad - trad, in each period, at school", tee, 
                 "MofNinT", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # dFofNinT: diff = 0 (of female nontrad change relative to concurrent female trad change, at school i in period X)
          #  TimeX + Arm.TimeX + Female.TimeX + School.TimeX + 
          #   + Arm.School.TimeX + Arm.Female.TimeX + Female.School.TimeX 
          #   + Arm.School.Female.TimeX 
          #    - (TimeX + Female.TimeX + School.TimeX + Female.School.TimeX)
          #  = Arm.TimeX + Arm.School.TimeX + Arm.Female.TimeX
          #   + Arm.School.Female.TimeX 
          #  = dMofNinT + Arm.Female.TimeX + Arm.School.Female.TimeX
          #  = dMofNinT + dFofNinT0
          # addteeFofNinT:  "^dummyInKind.Female.Time4$, 
          #  ^dummyInKind.dummyJunior.Female.Time4$, 
          #  ^dummyInKind.dummyHigh.Female.Time4$
          dFofNinT0[grepl(
            paste0(addteeFofNinT[c(1 ,i)], collapse = "|")
            , names(coeffvec))] <- 1*Mult
          dFofNinT <- dMofNinT + dFofNinT0
          # if tee == 2: Arm.TimeX + Arm.School.TimeX + Arm.Female.TimeX
          #   + Arm.School.Female.TimeX 
          #  =  Arm + Arm.School + Arm.Female+ Arm.School.Female
          #  = hvFofN
          if (tee == 2) dFofNinT <- hvFofN
          lhcow <- glht(model=thisreg, linfct = matrix(dFofNinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, g, "female", schlevels[i], 
                 "female nontrad change - female trad change, in each period, at school", tee, 
                 "dFofNinT", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # hvFofNinT: diff = 0 (of female nontrad relative to concurrent female trad, at school iin period X)
          #  Arm + Arm.School + Arm.Female + Arm.TimeX + 
          #  Arm.School.Female + Arm.School.TimeX + Arm.Female.TimeX + 
          #  Arm.School.Female.TimeX
          #  = Arm + Arm.School  (MofN)
          #   + Arm.Female + Arm.School.Female  (dFofNA)
          #   + Arm.TimeX + Arm.School.TimeX (dMofNinT)
          #   +  Arm.Female.TimeX + Arm.School.Female.TimeX  (dFofNinT0)
          #  = hvMofN + dFofNA + dMofNinT + dFofNinT0
          #  = hvMofN + dFofNA + dFofNinT
          hvFofNinT <- hvMofN + dFofNA + dFofNinT
          # if tee == 2,
          #  = Arm + Arm.School  (MofN)
          #   + Arm.Female + Arm.School.Female  (dFofNA)
          #  = hvFofN
          if (tee == 2) hvFofNinT <- hvMofN + dFofNA
          lhcow <- glht(model=thisreg, linfct = matrix(hvFofNinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, g, "female", schlevels[i], 
                 "female nontrad - female trad, in each period, at school", 
                 tee, "FofNinT", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # hvMofNinTL: cumulative change = 0 (of nontrad school i in period X)
          #  (intercept) + School + TimeX + School.TimeX 
          #    + Arm + Arm.School 
          #    + Arm.TimeX + Arm.School.TimeX 
          #  = hvMofTinTL + hvMofN + hvMofNinT
          hvMofNinTL <- hvMofTinTL + hvMofN + hvMofNinT
          #  if tee == 2
          #  (intercept) + School + Arm + Arm.School 
          #  = hvMofTA
          if (tee == 2) hvMofNinTL <- hvMofTA
          lhcow <- glht(model=thisreg, linfct = matrix(hvMofNinT, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, g, "male", schlevels[i], 
                 "level of nontrad in each period at school", tee, 
                 "MofNinTL", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
          # hvFofNinTL: cumulative change = 0 (of female nontrad school i in period X)
          #  (intercept) + School + TimeX + School.TimeX 
          #   + Arm + Arm.School 
          #   + Arm.TimeX + Arm.School.TimeX 
          #   + Female + School.Female  (dFofT)
          #   + Female.TimeX + School.Female.TimeX (dFofTinT)
          #   + Arm.Female + Arm.School.Female  (dFofNA)
          #   +  Arm.Female.TimeX + Arm.School.Female.TimeX  (dFofNinT0)
          # = hvMofNinTL + dFofT + dFofTinT + dFofNA + dFofNinT0
          hvFofNinTL <- hvMofTinTL + dFofT + dFofTinT + dFofNA + dFofNinT0
          #  if tee == 2
          #  (intercept) + School + Arm + Arm.School  (hvMofTA)
          #   + Female + School.Female  (dFofT)
          #   + Arm.Female + Arm.School.Female  (dFofNA)
          if (tee == 2) hvFofNinTL <- hvMofTA + dFofT + dFofNA
          lhcow <- glht(model=thisreg, linfct = matrix(hvFofNinTL, 
            byrow = T, nrow=1), alternative="two.sided", vcov.=thisV)
          confis <- rbind(confis, 
               c(FileNames[r], regtype, s, g, "female", schlevels[i], 
                 "level of female nontrad in each period at school", 
                 tee, "FofNinTL", 
                 confint(lhcow)$confint[1, ], 
                 if (sum(lhcow$linfct) != 0) summary(lhcow)$test$pvalues[1] else NA)
            )
        }  # end: TimeT tee loop
      } # end: school level i loop
    } # end: attribute g loop
  } # end: specification s loop
} # end: regression type rr loop
confis <- data.table(confis)
setnames(confis, c("FileName", "regtype", "num", "attributes", 
  "gender", "school", "ImpactType", "period", "hv", "estimate", "lb", "ub", "pvalue"))
 # traditional has 4 same entries when computing interactions 
confis <- confis[!duplicated(confis), ]
#### drop: b, a, P have zero in time interaction tests (e.g., TimeX + Arm.TimeX for X == 2)
confis <- confis[estimate != 0, ]
numcols <- c("period", "estimate", "lb", "ub", "num", "pvalue")
confis[, (numcols) := lapply(.SD, as.numeric), .SDcols = numcols]
#### drop: females are only added for specification s >= 5 & regtype = T, rewrite "male" => "all"
confis <- confis[!(num < 5 & grepl("female", ImpactType)), ]
#### Note: rewrite "male" => "all" for num < 5, 
#### we are losing gender = "male" entries for specification < 5. 
#### Need to get gender = all entries for graphs. But this should not be a problem 
#### as we need "male" entries only when we contrast with females (num>=5).
confis[num < 5 & grepl("male", gender), gender := "all"]
confis[grepl("T", regtype) & num < 5 & grepl("ref", ImpactType), ][
  order(regtype, num, attributes, ImpactType, period), ]
     FileName regtype   num  attributes gender  school              ImpactType period     hv
       <char>  <char> <num>      <char> <char>  <char>                  <char>  <num> <char>
 1: Schooling       T     2 traditional    all primary level of reference trad     NA  MofTA
 2: Schooling       T     2 traditional    all  junior level of reference trad     NA  MofTA
 3: Schooling       T     2 traditional    all    high level of reference trad     NA  MofTA
 4: Schooling       T     3 traditional    all primary level of reference trad     NA  MofTA
 5: Schooling       T     3 traditional    all  junior level of reference trad     NA  MofTA
 6: Schooling       T     3 traditional    all    high level of reference trad     NA  MofTA
 7: Schooling       T     4 traditional    all primary level of reference trad     NA  MofTA
 8: Schooling       T     4 traditional    all  junior level of reference trad     NA  MofTA
 9: Schooling       T     4 traditional    all    high level of reference trad     NA  MofTA
10: Schooling      Ta     2 traditional    all primary level of reference trad     NA  MofTA
11: Schooling      Ta     2 traditional    all  junior level of reference trad     NA  MofTA
12: Schooling      Ta     2 traditional    all    high level of reference trad     NA  MofTA
13: Schooling      Ta     3 traditional    all primary level of reference trad     NA  MofTA
14: Schooling      Ta     3 traditional    all  junior level of reference trad     NA  MofTA
15: Schooling      Ta     3 traditional    all    high level of reference trad     NA  MofTA
16: Schooling      Ta     4 traditional    all primary level of reference trad     NA  MofTA
17: Schooling      Ta     4 traditional    all  junior level of reference trad     NA  MofTA
18: Schooling      Ta     4 traditional    all    high level of reference trad     NA  MofTA
     estimate        lb        ub       pvalue
        <num>     <num>     <num>        <num>
 1: 0.6549961 0.5706943 0.7392978 0.000000e+00
 2: 0.6549961 0.5706943 0.7392978 0.000000e+00
 3: 0.6549961 0.5706943 0.7392978 0.000000e+00
 4: 0.7036368 0.6286568 0.7786168 0.000000e+00
 5: 0.5587881 0.4634733 0.6541029 0.000000e+00
 6: 0.4651104 0.3750613 0.5551595 0.000000e+00
 7: 0.8167770 0.6799279 0.9536260 0.000000e+00
 8: 0.6986848 0.5471346 0.8502350 0.000000e+00
 9: 0.6065558 0.4477207 0.7653910 1.083578e-13
10: 0.6549961 0.5706943 0.7392978 0.000000e+00
11: 0.6549961 0.5706943 0.7392978 0.000000e+00
12: 0.6549961 0.5706943 0.7392978 0.000000e+00
13: 0.7036368 0.6286568 0.7786168 0.000000e+00
14: 0.5587881 0.4634733 0.6541029 0.000000e+00
15: 0.4651104 0.3750613 0.5551595 0.000000e+00
16: 0.8167770 0.6799279 0.9536260 0.000000e+00
17: 0.6986848 0.5471346 0.8502350 0.000000e+00
18: 0.6065558 0.4477207 0.7653910 1.083578e-13
faccols <- c("FileName", "regtype", "attributes", "ImpactType", "hv", "gender", "school")
confis[, (faccols) := lapply(.SD, as.factor), .SDcols = faccols]
confis[, ImpactType := factor(ImpactType, 
  levels = c(
    "level of reference trad",
    "level of reference female trad",
    "level of trad in each period, at school",
    "level of female trad in each period, at school",
    "trad in each period - trad in period 2, at school",
    "female trad in each period - period 2 female trad, at school",
    "level of nontrad at school",
    "level of female nontrad at school",
    "level of nontrad in each period at school",
    "level of female nontrad in each period at school",
    "nontrad - trad, at school",
    "female nontrad - female trad, at school",
    "nontrad change - trad change, in each period, at school",
    "female nontrad change - female trad change, in each period, at school",
    "nontrad - trad, in each period, at school",
    "female nontrad - female trad, in each period, at school"
  ))]
confis[, ImpactType := factor(ImpactType, 
  labels = c(
    "level of reference trad",
    "level of reference female trad",
    "level of trad in each period at school",
    "level of female trad in each period at school",
    "trad in each period - trad in period 2, at school",
    "female trad in each period - period 2 female trad, at school",
    "level of nontrad at school",
    "level of female nontrad at school",
    "level of nontrad in each period at school",
    "level of female nontrad in each period at school",
    "nontrad - trad, at school",
    "female nontrad - female trad, at school",
    "nontrad change - trad change, in each period, at school",
    "female nontrad change - female trad change, in each period, at school",
    "nontrad - trad, in each period, at school",
    "female nontrad - female trad, in each period, at school"
  ))]
confis[, hv := factor(hv, 
  levels = c(
  "MofTA", "FofTA", "MofNA", "FofNA", "MofN", "FofN",
   "MofTinT", "FofTinT", "MofTinTL", "FofTinTL",
   "dMofNinT", "dFofNinT", "MofNinT" , "FofNinT",
   "MofNinTL", "FofNinTL"
  ))]
confis[, school := factor(school, levels = c("primary", "junior", "high"))]
confis[!grepl("T", regtype), period := NA]
setcolorder(confis, c("FileName", "regtype", "num", "attributes", 
  "ImpactType", "period", "lb", "estimate", "ub"))
confis[, attributes := factor(attributes, 
  levels = c("traditional", "Large", "LargeGrace", "Cattle",
  "LargeSize", "WithGrace", "InKind"))]
confis[, attributes := factor(attributes, 
  labels = c("Traditional", "Large", "LargeGrace", "Cattle",
  "Upfront", "WithGrace", "InKind"))]
confis[, AtType := "Arms (relative to Traditional)"]
confis[grepl("With|Kin", attributes), AtType := "Functional attributes (relative to Upfront, Upfront+WithGrace)"]
confis[, AtType := factor(AtType)]
saveRDS(confis, paste0(pathsaveHere, "EstimatesCISchooling.rds"))
qsave(confis, paste0(pathsaveHere, "EstimatesCISchooling.qs"))
confis[grepl("^.ofNinT$", hv) & grepl("T$", regtype) & grepl("ge$", attributes) & 
  grepl("j", school) & num == 5, ][order(gender, period), ]
    FileName regtype   num attributes                                              ImpactType
      <fctr>  <fctr> <num>     <fctr>                                                  <fctr>
1: Schooling       T     5      Large female nontrad - female trad, in each period, at school
2: Schooling       T     5      Large female nontrad - female trad, in each period, at school
3: Schooling       T     5      Large female nontrad - female trad, in each period, at school
4: Schooling       T     5      Large               nontrad - trad, in each period, at school
5: Schooling       T     5      Large               nontrad - trad, in each period, at school
6: Schooling       T     5      Large               nontrad - trad, in each period, at school
   period         lb     estimate         ub gender school      hv    pvalue
    <num>      <num>        <num>      <num> <fctr> <fctr>  <fctr>     <num>
1:      2 -0.4071382 -0.172937656 0.06126292 female junior FofNinT 0.1477282
2:      3 -0.2603041  0.035773671 0.33185146 female junior FofNinT 0.8127103
3:      4 -0.3920791 -0.095465521 0.20114804 female junior FofNinT 0.5279733
4:      2 -0.1407314 -0.000432567 0.13986623   male junior MofNinT 0.9951760
5:      3 -0.1947368  0.001223819 0.19718439   male junior MofNinT 0.9902289
6:      4 -0.2433969  0.009168600 0.26173405   male junior MofNinT 0.9432495
                           AtType
                           <fctr>
1: Arms (relative to Traditional)
2: Arms (relative to Traditional)
3: Arms (relative to Traditional)
4: Arms (relative to Traditional)
5: Arms (relative to Traditional)
6: Arms (relative to Traditional)

Below is a snippet of estimated objects:

dMofT=addcovaMofT[c(1, i)] (Intercept), dummyJunior, dummyHigh

dFofT=addcovaFofT[c(1, i)] Female, dummyJunior.Female, dummyHigh.Female

dMofNA=addcovaMofN[c(1, i)] dummyInKind, dummyInKind.dummyJunior, dummyInKind.dummyHigh

dFofNA=addcovaFofN[c(1, i)] dummyInKind.Female, dummyInKind.dummyJunior.Female, dummyInKind.dummyHigh.Female

hvMofTinT=addteeMofTinT[c(1 ,i)] Time.4, dummyJunior.Time4, dummyHigh.Time4

dFofTinT=addteeFofTinT[c(1 ,i)] Female.Time4, dummyJunior.Female.Time4, dummyHigh.Female.Time4

dMofNinT=addteeMofNinT[c(1 ,i)] dummyInKind.Time4, dummyInKind.dummyJunior.Time4, dummyInKind.dummyHigh.Time4

dFofNinT=addteeFofNinT[c(1 ,i)] dummyInKind.Female.Time4, dummyInKind.dummyJunior.Female.Time4, dummyInKind.dummyHigh.Female.Time4

Results plots

Raw outcomes

Assets

Mean asset outcomes by arm and period.

Click here to see the code to produce plots.
#### Run ComputeNetAssetsANCOVA.R first to produce 
#### various "Figure" data. This is ran in 
#### ### Descriptive statistics as a knitr child file.
#### source(paste0(pathprogram, "ComputeNetAssetsANCOVA.R"))
NeA1R <- readRDS(paste0(pathsaveHere, 
  "NetAssetsANCOVATrimmed.rds"))
cpn <- NeA1R[(CompleteAssetPanel) & tee == 1,
  .(Arm, hhid, tee, 
   CP=CompleteAssetPanel, NLHAssetAmount, 
   PAssetAmount, NumCows)]
#### comple asset panel sample is only 220 HHs 
#### and only 35 HHs for traditional
lvoD <- readRDS(paste0(pathsaveHere, 
  "NumCowsFigure.rds"))
nAD <- readRDS(paste0(pathsaveHere, 
  "AllNetAssetsFigureMeanData.rds"))
cpn <- readRDS(paste0(pathsaveHere, 
  "CPNetAssetsFigureMeanData.rds"))
conD <- readRDS(paste0(pathsaveHere, 
  "ConsumptionFigure.rds"))
labDHH <- readRDS(paste0(pathsaveHere, 
  "HHLabourIncomeFigure.rds"))
labDpc <- readRDS(paste0(pathsaveHere, 
  "pcHHLabourIncomeFigure.rds"))
schD <- readRDS(paste0(pathsaveHere, 
  "SchoolingFigure.rds"))
schD[, file := Schooling]
#### break down various asset measures in nAD
nAD[grepl("cow", Arm), Arm := "cattle"]
armsC <- c("traditional", "large", "large grace", "cattle")
nAD[, Arm := factor(Arm, levels = armsC)]
na <- nAD[, .(Arm, tee, NetValue..mean, NetValue..upper, 
  NetValue..lower, NetValue..N)]
pal <- nAD[, .(Arm, tee, ProdValue..mean, ProdValue..upper, 
  ProdValue..lower, ProdValue..N)]
pa <- nAD[, .(Arm, tee, PAssetAmount..mean, 
  PAssetAmount..upper, PAssetAmount..lower, PAssetAmount..N)]
cpn <- cpn[, .(Arm, tee, NetValue..mean, NetValue..upper, 
  NetValue..lower, NetValue..N)]
setnames(na, grepout("Ne", colnames(na)), 
  c("mean", "upper", "lower", "N"))
setnames(pal, colnames(na))
setnames(pa, colnames(na))
setnames(cpn, colnames(na))
figD <- rbindlist(list(
  cbind(file = "NumCows", lvoD),
  cbind(file = "PAssetAmount", pa),
  cbind(file = "ProdValue", pal),
  cbind(file = "NetAssets", na),
  cbind(file = "CPNetAssets", cpn),
  cbind(file = "Consumption", conD),
  cbind(file = "HHLabourIncomes", labDHH),
  cbind(file = "pcHHLabourIncomes", labDpc),
  schD[, .(file, Arm, sex, tee, lower, mean, upper, N)]
  ), use.names = T, fill = T)
figD[, file := factor(file, levels = c(
  "NumCows", "PAssetAmount", "ProdValue",
  "NetAssets", "CPNetAssets", 
  "Consumption", "HHLabourIncomes", "pcHHLabourIncomes",
  "primary0512", "junior1315", "high1618"))]
figD[, file := factor(file, labels = c(
  "NumCows", "PAssetAmount", "ProdValue",
  "NetAssets", "CPNetAssets", 
  "Consumption", "HHIncomes", "pcIncomes",
  "Sch0512", "Sch1315", "Sch1618"))]
figD[is.na(sex), sex := "NA"]
figD[, sex := factor(sex, labels = c("M", "F", "NA"))]
figD[, Sex := factor(sex, labels = 
  c("Male", "Female", "Per household"))]
figD[grepl("tra", Arm), Arm := "Traditional"]
figD[grepl("ge$", Arm), Arm := "Large"]
figD[grepl("ce$", Arm), Arm := "LargeGrace"]
figD[grepl("^ca", Arm), Arm := "Cattle"]
figD[, Arm := factor(Arm, levels = c(Arms[-4], "Cattle"))]
saveRDS(figD, paste0(pathsaveHere, "figD.rds"))

Consumption and labour incomes

Mean consumption and income outcomes by arm and period.

Click here to see the code to produce plot.

Saving and repayment

Click here to see the code of cumulative repayment plots.
library(ggplot2)
ga <- arA[!is.na(Date) & !is.na(DisDate1) & grepl("Yes", creditstatus), 
  .(Arm, hhid, povertystatus, MonthsElapsed, 
  DebtOutstanding, CumLoanAmount, value.repay, value.NetSaving, 
  CumPlannedInstallment, CumRepaidRate, CumEffectiveRepaidRate)]
ga <- arA[!is.na(Date) & !is.na(DisDate1) & grepl("Yes", creditstatus), 
  .(Arm, hhid, povertystatus, MonthsElapsed, 
  value.NetSaving, CumRepaid)]
ga1 <- ga[, !grepl("Ne", colnames(ga)), with = F]
ga1[, variable := "cumulative repayment"]
ga2 <- ga[, !grepl("Rep", colnames(ga)), with = F]
ga2[, variable := "weekly net saving"]
setnames(ga1, grepout("Re", colnames(ga1)), "amount")
setnames(ga2, grepout("Ne", colnames(ga2)), "amount")
ga <- rbindlist(list(ga1, ga2))
ga[, Arm := factor(Arm, labels = c(Arms[-4], "Cattle"))]
ga[, variable := factor(variable)]
ColourForPoints <- c("darkblue", "darkred")
g1 <- ggplot(ga[grepl("rep", variable), ], 
  aes(x = MonthsElapsed, y = amount, 
    colour = povertystatus, group = povertystatus)) +
  geom_point(aes(fill = povertystatus), size = .01, 
    position = position_dodge(width = .5), #colour = "transparent",
    alpha = .6) +
  geom_smooth(span = .5, size = .75,
    aes(colour = povertystatus, group = povertystatus)) +
  scale_colour_manual(values = ColourForPoints) +
  scale_fill_manual(values = c("blue", "red")) +
  theme(
    legend.position="none", 
    plot.margin = margin(t = 0, b = 0, l = 0, r = 0, "cm"),
    axis.text = element_text(size = 7),
    axis.title = element_text(size = 7),
    strip.text.x = element_text(color = "blue", size = 6, 
      margin = margin(0, .5, 0, .5, "cm")), 
    strip.text.y = element_text(color = "blue", size = 6, 
      margin = margin(.5, 0, .5, 0, "cm"))
  ) + 
  scale_y_continuous(limits = c(0, 20000)) +
  scale_x_continuous(limits = c(0, 48), breaks = seq(0, 48, 12))+
  xlab("Months since 1st loan disbursement") + 
  ylab("Amount (BDT)") +
  facet_grid(variable ~ Arm)
g2 <- ggplot(ga[grepl("sav", variable), ], 
  aes(x = MonthsElapsed, y = amount, 
    colour = povertystatus, group = povertystatus)) +
  geom_point(aes(fill = povertystatus), size = .01, 
    position = position_dodge(width = .5), #colour = "transparent",
    alpha = .6) +
  geom_smooth(span = .5, size = .75,
    aes(colour = povertystatus, group = povertystatus)) +
  scale_colour_manual(values = ColourForPoints) +
  scale_fill_manual(values = c("blue", "red")) +
  theme(
    legend.position="bottom", 
    legend.text = element_text(size = 7),
    legend.title = element_text(size = 9),
    legend.key = element_rect(fill = "white"),
    legend.key.size = unit(.25, "cm"),
    axis.text = element_text(size = 7),
    axis.title = element_text(size = 7),
    strip.text.x = element_text(color = "blue", size = 6, 
      margin = margin(0, .5, 0, .5, "cm")), 
    strip.text.y = element_text(color = "blue", size = 6, 
      margin = margin(.5, 0, .5, 0, "cm"))
  ) + 
  scale_y_continuous(limits = c(0, 800)) +
  scale_x_continuous(limits = c(0, 48), breaks = seq(0, 48, 12))+
  xlab("Months since 1st loan disbursement") + 
  ylab("Amount (BDT)") +
  facet_grid(variable ~ Arm)
library(gridExtra)
g <- grid.arrange(g1, g2, heights = c(2, 2.5), ncol=1)

Weekly net saving and cumulative repayment by poverty status

Weekly net saving and cumulative repayment by poverty status
ggsave(
  paste0(pathprogram, 
    "figure/ImpactEstimationOriginal1600Memo2/",
    "CumulativeWeeklyNetSavingAndRepayment.png"),
  g,
  width = 14, height = 10, units = "cm",
  dpi = 400
 )
library(grid)
cairo_pdf(
  paste0(pathprogram, 
    "figure/ImpactEstimationOriginal1600Memo2/",
    "CumulativeWeeklyNetSavingAndRepayment.pdf"),
  , width = 13/2.54, height = 10/2.54, pointsize = 10) # native unit: inch
grid.draw(g)
whatever <- dev.off()
Note: Each dot represents weekly observations. Only members who received loans are shown. Each panel shows weekly net saving (saving - withdrawal) or cumulative repayment against weeks after first disbursement. Lines are smoothed lines with a penalized cubic regression spline in ggplot2::geom_smooth function, originally from mgcv::gam with bs=cs’`.

Weekly net saving and cumulative repayment by poverty status

Weekly net saving and cumulative repayment by poverty status

Note: Each dot represents weekly observations. Only members who received loans are shown. Each panel shows ratios of cumulative repayment against cumulative due amount, sum of cumulative repayment and cumulative net saving (saving - withdrawal) against cumulative due amount, against weeks after first disbursement. Lines are smoothed lines with a penalized cubic regression spline in ggplot2::geom_smooth function, originally from mgcv::gam with bs=cs’`.

Click here to see the code of cumulative repaid rate plots.
library(ggplot2)
ga <- arA[!is.na(Date) & !is.na(DisDate1) & grepl("Yes", creditstatus) & 
  grepl("bo", BStatus) & o800 == 1L, 
  .(Arm, hhid, povertystatus, MonthsElapsed, 
  CumNetSaving, CumRepaid, CumRepaidRate, CumEffectiveRepaidRate)] 
####  ga1: amount
ga1 <- ga[, !grepl("Ne|Rate", colnames(ga)), with = F]
ga1[, variable := "repayment"]
####  ga2: rate
ga20 = copy(ga)
ga20 <- ga20[, grepout("Ne|Repaid$|variab", colnames(ga20)) := NULL]
ga20 <- ga20[!is.na(CumEffectiveRepaidRate) & 
  !is.na(CumEffectiveRepaidRate), ]
ga21 <- ga20[, .(Arm, hhid, povertystatus, MonthsElapsed, CumEffectiveRepaidRate)]
ga22 <- ga20[, .(Arm, hhid, povertystatus, MonthsElapsed, CumRepaidRate)]
setnames(ga21, "CumEffectiveRepaidRate", "value")
setnames(ga22, "CumRepaidRate", "value")
ga21[, variable := "Repay+net saving"]
ga22[, variable := "Repayment"]
ga2 <- rbindlist(list(ga21, ga22))
ga2[, variable := factor(variable, 
  levels = c("Repayment", "Repay+net saving"))]
setnames(ga1, grepout("Re", colnames(ga1)), "amount")
#setnames(ga2, grepout("Re", colnames(ga2)), "amount")
#ga <- rbindlist(list(ga1, ga2))
ColourForPoints <- c("darkblue", "darkred")
g <- ggplot(ga2, 
  aes(x = MonthsElapsed, y = value, 
    colour = povertystatus, group = povertystatus)) +
  geom_point(aes(fill = povertystatus), size = .01, 
    position = position_dodge(width = .5), #colour = "transparent",
    alpha = .6) +
  geom_smooth(span = .5, size = .5, #colour = "blue", 
    aes(colour = povertystatus, group = povertystatus)) +
  scale_colour_manual(values = ColourForPoints) +
  scale_fill_manual(values = c("blue", "red")) +
####   scale_shape_manual(values=c(21, 25)) +
  theme(
    legend.position="bottom", 
    legend.text = element_text(size = 7),
    legend.title = element_text(size = 9),
    legend.key = element_rect(fill = "white"),
    legend.key.size = unit(.5, "cm"),
    axis.text = element_text(size = 7),
    axis.title = element_text(size = 7),
    strip.text.x = element_text(color = "blue", size = 6, 
      margin = margin(0, .5, 0, .5, "cm")), 
    strip.text.y = element_text(color = "blue", size = 6, 
      margin = margin(.5, 0, .5, 0, "cm"))
  ) + 
  scale_y_continuous(limits = c(0, 2)) +
  scale_x_continuous(limits = c(0, 48), breaks = seq(0, 48, 12)) +
  xlab("Months since 1st loan disbursement") + 
  ylab("Cumulative repayment rates") +
  facet_grid(variable ~ Arm, scales = "free_y") +
  geom_hline(aes(yintercept = 1), colour = "lightgreen", data = ga2)
ggsave(
  paste0(pathprogram, 
    "figure/ImpactEstimationOriginal1600Memo2/",
    "CumulativeWeeklyRepaymentRateByPovertystatus.png"),
  g,
  width = 12, height = 6, units = "cm",
  dpi = 300
 )

Cumulative weekly net repayment rates by poverty status

Cumulative weekly net repayment rates by poverty status

The study followed the stepped wedge design within each group due to administrative and budgetary constraints. Our initial identification strategy was comaprison between arms and did not use the stepped wedge design to estimate impacts because of possible spillovers within a group and a relatively short period for outcomes to change before the control gets treated [We can estimate within-group, we may just have underestimated impacts]. A half of members in a group, approximately 800 in total, are assigned initially as the treated and then the rest was treated in the following months. So the number of the treated increased as time passes.

We restrict ourselves to this initial 800 members in estimating the impacts. We do so because of possible spill overs within groups. We compare between arms, not individuals in a group. One can see how impacts may differ if we compare between-group and within-group estimates. Such comparison is left as future exercises.

We will add a binary indicator function o800 to indicate the initial sample. In below, we first use the roster-administrative data to choose the households of o800, because it has the most complete record. Then, I look for these households in other files and create o800 variable in them.

Impact estimates

Assets

Click here to see the code.
library(ggplot2)
confi <- qread(paste0(pathsaveHere, "EstimatesCI.qs"))
confi1 <- confi[
  grepl("^NetAssets$", FileName) & 
  !grepl("None|Adi|Own", FileName) & 
  !grepl("Tr|Up", attributes) &
  grepl("^periN", hv) &
  grepl("Ta?$", regtype), ]
confi1[grepl("^Large$", attributes), attributes := "Large/Upfront"]
cols <- c("FileName", "regressand", "attributes", "regtype")
confi1[, (cols) := droplevels(.SD), .SDcols = cols]
confi1[, attributes := factor(attributes, levels = 
  c("Large/Upfront", "LargeGrace", "Cattle", "WithGrace", "InKind"))]
confi1[, num := factor(num-1)]
p <- ggplot(data = confi1
  , aes(x = factor(period), y = estimate, 
      colour = num, shape = num, group = num)) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .5))
p <- p + facet_grid( ~ attributes, scales = "free_y") + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 5, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 6), 
   axis.title = element_text(size = 6), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   panel.spacing.x = unit(c(.1, .1, .3, .1), units = "cm"),
   panel.spacing.y = unit(.1, units = "cm"),
   legend.position="bottom") + 
  xlab("periods") + 
  labs(color  = "regression specifications", shape = "regression specifications") +
  guides(colour = guide_legend(title = "regression specifications", nrow = 1)) +
  geom_hline(aes(yintercept = 0), data = confi1, colour = "lightgreen")
p <- p + ggh4x::facet_nested( ~ AtType+attributes, scales = "free_y")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/NetAssetsEffects.jpg"),
  p,
  width = 13*2, height = 6*2, units = "cm",
  dpi = 600
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/NetAssetsEffects.pdf")
  , width = 2*12/2.54, height = 2*5/2.54)
print(p)
whatever <- dev.off()
library(ggplot2)
confi <- qread(paste0(pathsaveHere, "EstimatesCI.qs"))
confi1 <- confi[
  grepl("Annual|^NetB|NetNL|ws$", FileName) & 
  !grepl("None|Adi|Own", FileName) & 
  !grepl("Tr|Up", attributes) &
  grepl("^periN", hv) &
  grepl("T$", regtype) & num > 1, ]
confi1[grepl("^Large$", attributes), attributes := "Large"]
cols <- c("FileName", "regressand", "attributes", "regtype")
confi1[, (cols) := droplevels(.SD), .SDcols = cols]
confi1[, regressand := factor(regressand, levels = 
  c("net assets, AP", "net non-livestock assets", "net broad assets", "cattle"))]
confi1[, regressand := factor(regressand, labels = 
  c("Net assets,\nannual price (BDT)", "Net non-livestock\n assets (BDT)", 
  "Net broad assets\n (BDT)", "Cattle (counts)"))]
table(confi1[,.(attributes, regressand)])
            regressand
attributes   Net assets,\nannual price (BDT) Net non-livestock\n assets (BDT)
  Large                                   15                               15
  LargeGrace                              15                               15
  Cattle                                  15                               15
            regressand
attributes   Net broad assets\n (BDT) Cattle (counts)
  Large                            15               9
  LargeGrace                       15               9
  Cattle                           15               9
confi1[, num := factor(num-1)]
p <- ggplot(data = confi1
  , aes(x = factor(period), y = estimate, 
      colour = num, shape = num, group = num)) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .5))
p <- p + facet_grid(regressand ~ attributes, scales = "free_y") + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 7, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 8), 
   axis.title = element_text(size = 8), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   #panel.spacing.x = unit(c(.1, .1, .3, .1), units = "cm"),
   #panel.spacing.y = unit(.1, units = "cm"),
   legend.position="bottom") + 
  xlab("periods") + 
  labs(color  = "regression specifications", shape = "regression specifications") +
  guides(colour = guide_legend(title = "regression specifications", nrow = 1)) +
  geom_hline(aes(yintercept = 0), data = confi1, colour = "lightgreen")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/NetAssetsNetBroadAssetsNLAssetsCattleEffects.jpg"),
  p,
  width = 13*1.5, height = 12*1.5, units = "cm",
  dpi = 300
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/NetAssetsNetBroadAssetsNLAssetsCattleEffects.pdf")
  , width = 2*12/2.54, height = 2*8/2.54)
print(p)
whatever <- dev.off()

Net asset impacts are estimated with ANCOVA. Large/Upfront , LargeGrace, and Cattle give impacts relative to Traditional arm. `WithGrace gives the grace period impacts relative to Upfront. InKind gives the impacts of managerial supports relative to the combination of Upfront and WithGrace. s```

Robustness checks: Impacts on various asset measures. Time-varying impacts on net assets evaluated with annualised price, net broad assets, non-livestock assets (BDT), and cattle holding (counts). Net asset value = livestock asset value + non-livestock asset value - debt. Net broad assets use all asset items, net assets in our main results only use asset items appearing in all rounds. Net assets, annual price uses annual median price for livestock evaluation while Net assets uses median price of all rounds. Columns of Large, Large grace, and Cattle show impacts relative to the Traditional arm. 4th and 5th regression specifications use baseline cattle count and baseline cattle ownership dummy variable as covariates, hence they are omitted from impacts on Cattle (counts). s```

Robust to:

  • Choice of asset definition (net broad assets vs. net assets).
  • Choice of price index (overall median vs. annual median).
  • Choice of asset type (total vs. non-livestock vs. cattle).

Schooling

Click here to see the code.
library(ggplot2)
confis <- qread(paste0(pathsaveHere, "EstimatesCISchooling.qs"))
confi2 <- unique(confis)
confi2 <- confi2[!grepl("^Up", attributes), ]
confi2 <- confi2[grepl("^Large$", attributes), attributes := "Large/Upfront"]
confi2 <- confi2[grepl("T$", regtype), ]
cols <- c("FileName", "school", "attributes")
confi2[, (cols) := droplevels(.SD), .SDcols = cols]
confi2[, attributes := factor(attributes, levels = 
  c("Traditional", "Large/Upfront", "LargeGrace", "Cattle"))]
confi2[, attributes := factor(attributes, labels = 
  c("Traditional", "Large", "LargeGrace", "Cattle"))]
#### Trad: Level in each period at school i
confi2t <- confi2[(grepl("^Tra", attributes) & grepl("lev.* trad.*ea", ImpactType)) & num >= 5, ]
#### Nontrad: nontrad - trad, in each period, at school i
confi2n <- confi2[grepl("change", ImpactType) & num >= 5, ][order(gender, period), ]
confi3 <- rbind(confi2t, confi2n)
confi3[, num := factor(num-4)]
faccol <- c("attributes", "gender", "ImpactType", "hv", "regtype", "num")
confi3[, (faccol) := lapply(.SD, droplevels), .SDcol = faccol]
table(confi3[,.(ImpactType, attributes)])
                                                                       attributes
ImpactType                                                              Traditional Large
  level of trad in each period at school                                         18     0
  level of female trad in each period at school                                  18     0
  nontrad change - trad change, in each period, at school                         0    18
  female nontrad change - female trad change, in each period, at school           0    18
                                                                       attributes
ImpactType                                                              LargeGrace Cattle
  level of trad in each period at school                                         0      0
  level of female trad in each period at school                                  0      0
  nontrad change - trad change, in each period, at school                       18     18
  female nontrad change - female trad change, in each period, at school         18     18
confi3[, numgen := paste0(gender, ", spec", num)]
confi3[, effects := "Level estimates"]
confi3[!grepl("Trad", attributes), effects := "Marginal impacts relative to Traditional"]
confi3[, numgen := paste0(gender, ", spec", num)]
confi3[, effects := "Level estimates"]
confi3[!grepl("Trad", attributes), effects := "Marginal impacts relative to Traditional"]
p <- ggplot(data = confi3
  , aes(x = factor(period), y = estimate, 
      colour = numgen, shape = numgen, group = numgen)) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .25))
p <- p + facet_grid(school ~ attributes, scales = "free_y") + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 7, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 7), 
   axis.title = element_text(size = 7), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   panel.spacing.x = unit(c(.3, .1, .1), units = "cm"),
   panel.spacing.y = unit(.1, units = "cm"),
   legend.position="bottom",
   legend.key.size = unit(0.1, "cm"),
   legend.text = element_text(size = 7)) + 
  xlab("periods") + 
  labs(color  = "gender, regression specifications", shape = "gender, regression specifications") +
  guides(colour = guide_legend(title = "gender, regression specifications", nrow = 1)) +
  geom_hline(aes(yintercept = 0), data = confi3, colour = "lightgreen")
p <- p + ggh4x::facet_nested(school ~ effects + attributes, scales = "free_y")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/SchoolingEffectsConcurrentWithTradByArm.jpg"),
  p,
  width = 14*2, height = 12*2, units = "cm",
  dpi = 450
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/SchoolingEffectsConcurrentWithTradByArm.pdf"),
  , width = 12*2/2.54, height = 12*2/2.54)
print(p)
whatever <- dev.off()
library(ggplot2)
confis <- qread(paste0(pathsaveHere, "EstimatesCISchooling.qs"))
confi2 <- unique(confis)
confi2 <- confi2[grepl("^Large$", attributes), attributes := "Large/Upfront"]
confi2 <- confi2[grepl("Ta$", regtype), ]
cols <- c("FileName", "school", "attributes")
confi2[, (cols) := droplevels(.SD), .SDcols = cols]
confi2[, attributes := factor(attributes, levels = 
  c("Traditional", "Upfront", "WithGrace", "InKind"))]
#### Trad: Level in each period at school i
confi2t <- confi2[(grepl("^Tra", attributes) & grepl("lev.* trad.*ea", ImpactType)) & num >= 5, ]
#### Nontrad: nontrad - trad, in each period, at school i
confi2n <- confi2[grepl("change", ImpactType) & num >= 5, ][order(gender, period), ]
confi3 <- rbind(confi2t, confi2n)
confi3[, num := factor(num-4)]
faccol <- c("attributes", "gender", "ImpactType", "hv", "regtype", "num")
confi3[, (faccol) := lapply(.SD, droplevels), .SDcol = faccol]
table(confi3[,.(ImpactType, attributes)])
                                                                       attributes
ImpactType                                                              Traditional Upfront
  level of trad in each period at school                                         18       0
  level of female trad in each period at school                                  18       0
  nontrad change - trad change, in each period, at school                         0      18
  female nontrad change - female trad change, in each period, at school           0      18
                                                                       attributes
ImpactType                                                              WithGrace InKind
  level of trad in each period at school                                        0      0
  level of female trad in each period at school                                 0      0
  nontrad change - trad change, in each period, at school                      18     18
  female nontrad change - female trad change, in each period, at school        18     18
confi3[, numgen := paste0(gender, ", spec", num)]
confi3[, effects := "Level estimates"]
confi3[!grepl("Trad", attributes), effects := "Marginal impacts relative to \nTraditional, Upfront, Upfront+WithGrace"]
confi3[, attributes := factor(attributes, label = c("Traditional", 
  "Upfront\nrelative to Traditional", "WithGrace\nrelative to Upfront", 
  "InKind\nrelative to Upfront+WithGrace"))]
p <- ggplot(data = confi3
  , aes(x = factor(period), y = estimate, 
      colour = numgen, shape = numgen, group = numgen)) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .25))
p <- p + facet_grid(school * gender ~ attributes, scales = "free_y") + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 7, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 7), 
   axis.title = element_text(size = 7), 
   strip.text.x = element_text(color = "blue", size = 8, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   panel.spacing.x = unit(c(.3, .1, .1), units = "cm"),
   panel.spacing.y = unit(.1, units = "cm"),
   legend.position="bottom",
   legend.key.size = unit(0.1, "cm"),
   legend.text = element_text(size = 7)) + 
  xlab("periods") + 
  labs(color  = "regression specifications", shape = "regression specifications") +
  guides(colour = guide_legend(title = "regression specifications", nrow = 1)) +
  geom_hline(aes(yintercept = 0), data = confi3, colour = "lightgreen")
p <- p + ggh4x::facet_nested(school ~ effects + attributes, scales = "free_y")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/SchoolingEffectsConcurrentWithTradByFunAttribute.jpg"),
  p,
  width = 14*2, height = 12*2, units = "cm",
  dpi = 450
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/SchoolingEffectsConcurrentWithTradByFunAttribute.pdf"),
  , width = 12*2/2.54, height = 10*2/2.54)
print(p)
whatever <- dev.off()

Schooling impacts by arm and by period. Impacts are relative to concurrent Traditional arm. Traditional shows raw enrollment rates of Traditional arm. Large , LargeGrace, and Cattle give impacts relative to concurrent Traditional arm.

Schooling impacts by functional attribute and by period. Impacts are relative to respective concurrent functional attrnibutes. Traditional shows raw enrollment rates of Traditional arm. Upfront gives concurrent upfront liquidity impacts relative to Traditional. WithGrace gives concurrent grace period impacts relative to Upfront. InKind gives concurrent impacts of managerial supports relative to the sum of Upfront and WithGrace.

  • Primary school aged boys’ schooling is negatively affected for Upfront functional attribute, especially towards the final round.

Consumption and labour incomes

Click here to see the code.
library(ggplot2)
confi <- qread(paste0(pathsaveHere, "EstimatesCI.qs"))
confi2 <- confi[
  (grepl("Lab", FileName) |(grepl("OLS", FileName) & num <= 3)) &
  #grepl("^Ta?$", regtype) & For Arm, Fun Attribute panels
  grepl("^T$", regtype) & 
  # traditional gross level, nontrad cumulative relative to trad gross
  ((grepl("Tra", attributes) & grepl("lev.* trad.*d$", ImpactType)) |
    (!grepl("Tra", attributes) & grepl("sum", ImpactType))), ]
confi2[grepl("^Large$", attributes), attributes := "Large/Upfront"]
confi2[grepl("Fun", AtType), 
  AtType := "Functional attributes\n (relative to Upfront, Upfront+WithGrace)"]
confi2 <- confi2[!grepl("^Up", attributes), ]
confi2[, attributes := factor(attributes, levels = 
  c("Traditional", "Large/Upfront", "LargeGrace", "Cattle",
    "WithGrace", "InKind"))]
confi3 <- confi2[!grepl("Tra", attributes), ]
cols <- c("FileName", "regressand", "attributes", "hv", "ImpactType", "AtType")
confi3[, (cols) := droplevels(.SD), .SDcols = cols]
confi3[grepl("lab", regressand), num := num-1]
confi3[, num := factor(num)]
#confi2[grepl("Lab", FileName), estimate := estimate*100]
#confi2[grepl("Lab", FileName), ub := ub*100]
#confi2[grepl("Lab", FileName), lb := lb*100]
p <- ggplot(data = confi3
  , aes(x = factor(period), y = estimate, 
      colour = num, shape = num, group = num)) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .5))
p <- p + facet_grid(regressand ~ attributes, scales = "free_y",
   labeller = label_wrap_gen(multi_line = TRUE)) + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 5, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 6), 
   axis.title = element_text(size = 6), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   #panel.spacing.x = unit(c(.1, .1, .3, .1), units = "cm"), For Arm, Fun Attribute panels
   panel.spacing.x = unit(c(.1, .1), units = "cm"),
   panel.spacing.y = unit(.1, units = "cm"),
   legend.position="bottom") + 
  xlab("periods") + 
  labs(color  = "regression specifications", shape = "regression specifications") +
  guides(colour = guide_legend(title = "regression specifications", nrow = 1)) +
  geom_hline(aes(yintercept = 0), data = confi3, colour = "lightgreen")
#p <- p + ggh4x::facet_nested(regressand ~ AtType+attributes, scales = "free_y")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/IncomeConsumptionEffects.jpg"),
  p,
  width = 13*2, height = 8*2, units = "cm",
  dpi = 300*4
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/IncomeConsumptionEffects.pdf"),
  , width = 13*2/2.54, height = 8*2/2.54)
print(p)
whatever <- dev.off()

Consumption and labour income impacts. Large/Upfront , LargeGrace, and Cattle give impacts relative to Traditional arm. Consumption impacts are estimated with OLS, labour income impacts are estimated with ANCOVA. There are only two regression specifications for consumption, because we do not expect net asset at baseline or cattle holding at baseline to affect consumption changes. Results using these covariates give qualitatively the same results.

Net assets by experience

Click here to see the code.
library(ggplot2)
confi <- qread(paste0(pathsaveHere, "EstimatesCI.qs"))
cie1 <- confi[
  grepl("^NetA.*ts", FileName) & grepl("^non.*-.*\\,", ImpactType) & 
  grepl("Adi|None|Own", regressand) & 
  grepl("^T$", regtype), ]
cols <- c("FileName", "regressand", "attributes", "ImpactType")
cie1[, (cols) := droplevels(.SD), .SDcols = cols]
cie1[, SubGroup := factor(gsub(".*ts\\, ", "", regressand))]
cie1[, SubGroup := factor(SubGroup, levels = c("Own", "Adi", "None"))]
cie1[, SubGroup := factor(SubGroup, labels = c("Owner", "Adi", "None"))]
cie1[, num := factor(num-1)]
cie1[, num := gsub("^", "Spec ", num)]
p <- ggplot(data = cie1
  , aes(x = factor(period), y = estimate, 
      colour = SubGroup, shape = SubGroup, group = SubGroup), size = .1) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .5))
p <- p + facet_grid(num ~ attributes) + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 7, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 8), 
   axis.title = element_text(size = 8), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   #panel.spacing.x = unit(c(.1, .1, .3, .1), units = "cm"),
   #panel.spacing.y = unit(.1, units = "cm"),
   legend.text = element_text(size = 7),
   legend.title = element_text(size = 7),
   legend.key = element_rect(fill = "white"),
   legend.key.size = unit(.25, "cm"),
   legend.position="bottom") + 
  xlab("periods") + 
  labs(color  = "Group by experience", shape = "Group by experience") +
  guides(
    colour = guide_legend(title = "Group by experience", nrow = 1),
    shape = guide_legend(override.aes = list(size = .125))) +
  geom_hline(aes(yintercept = 0), data = cie1, colour = "lightgreen")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/NetAssetsByExperienceEffects.jpg")
  , p,
  width = 12*2, height = 6*2, units = "cm",
  dpi = 300*4
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/NetAssetsByExperienceEffects.pdf")
  , width = 2*12/2.54, height = 2*6/2.54)
print(p)
whatever <- dev.off()

Net assets, experienced vs. inexperienced. Columns of Large, Large grace, and Cattle show impacts relative to the Traditional arm.

Cattle holding by experience

Click here to see the code.
library(ggplot2)
confi <- qread(paste0(pathsaveHere, "EstimatesCI.qs"))
confie1 <- confi[
  grepl("^Num", FileName) & 
  !grepl("Exp", FileName) & 
  grepl("^periN", hv) & 
  grepl("^T$", regtype) & 
  !grepl("Trad", attributes), ]
cols <- c("FileName", "regressand", "attributes")
confie1[, (cols) := droplevels(.SD), .SDcols = cols]
confie1[, SubGroup := factor(gsub(".*tle\\, ", "", regressand))]
confie1[, SubGroup := factor(SubGroup, levels = c("cattle", "Own", "Adi", "None"))]
confie1[, SubGroup := factor(SubGroup, labels = c("All members", "Owner", "Adi", "None"))]
addmargins(table(confie1[, .(SubGroup, num)]))
             num
SubGroup        1   2   3   4 Sum
  All members   9   9   9   9  36
  Owner         9   9   9   0  27
  Adi           9   9   9   0  27
  None          9   9   9   0  27
  Sum          36  36  36   9 117
#### Comparable: 
####  NumCows (All) 1 = 1 in all others (not included in confi)
####  NumCows (All) 2 = 2 in Own, 
####  NumCows (All) 3 = 3 in Own, 3 in Adi, None (OLS, so not strictly comparable)
####  NumCows (All) 4: does not exist in Own, Adi, None 
confie2 <- confie1[grepl("1", num), ]
p <- ggplot(data = confie2
  , aes(x = factor(period), y = estimate, 
      colour = SubGroup, shape = SubGroup, group = SubGroup), size = .1) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .5))
p <- p + facet_grid( ~ attributes) + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 7, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 8), 
   axis.title = element_text(size = 8), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   #panel.spacing.x = unit(c(.1, .1, .3, .1), units = "cm"),
   #panel.spacing.y = unit(.1, units = "cm"),
   legend.text = element_text(size = 7),
   legend.title = element_text(size = 7),
   legend.key = element_rect(fill = "white"),
   legend.key.size = unit(.25, "cm"),
   legend.position="bottom") + 
  xlab("periods") + 
  labs(color  = "Group by experience", shape = "Group by experience") +
  guides(
    colour = guide_legend(title = "Group by experience", nrow = 1),
    shape = guide_legend(override.aes = list(size = .125))) +
  geom_hline(aes(yintercept = 0), data = confie2, colour = "lightgreen")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/NumCowsByExperienceEffects.jpg")
  , p,
  width = 12*2, height = 4*2, units = "cm",
  dpi = 300
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/NumCowsByExperienceEffects.pdf")
  , width = 2*12/2.54, height = 2*4/2.54)
print(p)
whatever <- dev.off()

Cattle holding, experienced vs. inexperienced. Columns of Large, Large grace, and Cattle show impacts relative to the Traditional arm.

Results by poverty class

Click here to see the code.
library(ggplot2)
confi <- qread(paste0(pathsaveHere, "EstimatesCI.qs"))
confi2 <- confi[
  (grepl("Lab", FileName) |(grepl("OLS", FileName) & num <= 3)) &
  grepl("^TP$", regtype) & grepl("sum.*poor non", ImpactType), ]
confi2[grepl("on", regressand), regressand := "Per capita consumption\n(BDT)"]
confi2[!grepl("on", regressand), regressand := "Labour income\n(BDT)"]
cols <- c("FileName", "regressand", "attributes", "hv", "ImpactType", "AtType")
confi2[, (cols) := droplevels(.SD), .SDcols = cols]
confi2[grepl("lab", regressand), num := num-1]
confi2[, num := factor(num)]
p <- ggplot(data = confi2
  , aes(x = factor(period), y = estimate, 
      colour = num, shape = num, group = num)) + 
  geom_pointrange(aes(
    ymin = lb, ymax = ub), 
    stat = "identity", fatten = 1.75, 
    position = position_dodge(width = .5))
p <- p + facet_grid(regressand ~ attributes, scales = "free_y",
   labeller = label_wrap_gen(multi_line = TRUE)) + 
  scale_y_continuous(name = "impacts" #,limits = c(-.35, .15)
  ) +
  scale_x_discrete(name = "periods", breaks = 2:4) +
  theme(
   axis.text.x = element_text(size = 5, angle = 0, vjust = 1, hjust = 1), 
   axis.text.y = element_text(size = 6), 
   axis.title = element_text(size = 6), 
   strip.text.x = element_text(color = "blue", size = 9, 
     margin = margin(.1, 1.25, .1, 1.25, "cm")), 
   strip.text.y = element_text(color = "blue", size = 9, 
     margin = margin(1.5, .1, 1.5, .1, "cm")),
   #panel.spacing.x = unit(c(.1, .1, .3, .1), units = "cm"), For Arm, Fun Attribute panels
   panel.spacing.x = unit(c(.1, .1), units = "cm"),
   panel.spacing.y = unit(.1, units = "cm"),
   legend.position="bottom") + 
  xlab("periods") + 
  labs(color  = "regression specifications", shape = "regression specifications") +
  guides(colour = guide_legend(title = "regression specifications", nrow = 1)) +
  geom_hline(aes(yintercept = 0), data = confi2, colour = "lightgreen")
#p <- p + ggh4x::facet_nested(regressand ~ AtType+attributes, scales = "free_y")
ggsave(
  paste0(pathprogram, 
  "figure/EstimationMemo/IncomeConsumptionPovertyEffects.jpg"),
  p,
  width = 13*2, height = 6*2, units = "cm",
  dpi = 300
 )
pdf(
  paste0(pathprogram, 
  "figure/EstimationMemo/IncomeConsumptionPovertyEffects.pdf"),
  , width = 13*2/2.54, height = 6*2/2.54)
print(p)
whatever <- dev.off()

Impacts on consumption and incomes of the ultra poor relative to the moderately poor. Columns of Large, Large grace, and Cattle show impacts relative to the moderately poor of the same arm.

  • Consumption of the ultra poor was smaller in Large and Cattle arms from period 3 onwards.
  • This is consistent with the repayment burden to be excessive for the ultra poor, implicating a longer maturity or saving periods.